{"id":4080,"date":"2024-08-12T21:43:00","date_gmt":"2024-08-12T12:43:00","guid":{"rendered":"https:\/\/matoken.org\/blog\/?p=4080"},"modified":"2024-08-12T21:43:02","modified_gmt":"2024-08-12T12:43:02","slug":"m-is-displayed-only-in-git-diff-differences","status":"publish","type":"post","link":"https:\/\/matoken.org\/blog\/2024\/08\/12\/m-is-displayed-only-in-git-diff-differences\/","title":{"rendered":"git diff \u306e \u5dee\u5206\u306b\u3060\u3051 ^M \u304c\u8868\u793a\u3055\u308c\u308b"},"content":{"rendered":"<div class=\"paragraph\">\n<p>git diff \u3067\u5909\u7a2e\u7b87\u6240\u3060\u3051 <code>^M<\/code> \u304c\u4ed8\u3044\u3066\u308b\u306e\u306b\u6c17\u3065\u304d\u307e\u3057\u305f\uff0e<br \/>\n\u7de8\u96c6\u30df\u30b9\u3066\u6539\u884c\u30b3\u30fc\u30c9\u3092\u9593\u9055\u3048\u305f\u304b\u3068\u601d\u3063\u305f\u3051\u3069\u5143\u3005 <code>\\r\\n<\/code> \u306a\u30d5\u30a1\u30a4\u30eb\u3067\u7de8\u96c6\u7b87\u6240\u4ee5\u5916\u3082\u540c\u3058 <code>\\r\\n<\/code> \u3067\u3059\uff0e<br \/>\n\u3067\u3082\u975e\u7de8\u96c6\u7b87\u6240\u306f <code>^M<\/code> \u304c\u51fa\u307e\u305b\u3093\uff0e<\/p>\n<\/div>\n<p><!--more--><br \/>\n<iframe src=\"https:\/\/inari.opencocon.org\/@matoken\/112948338585337696\/embed\" class=\"mastodon-embed\" style=\"max-width: 100%; border: 0\" width=\"400\" allowfullscreen=\"allowfullscreen\"><\/iframe><script src=\"https:\/\/inari.opencocon.org\/embed.js\" async=\"async\"><\/script><\/p>\n<div class=\"listingblock\">\n<div class=\"title\">git diff<\/div>\n<div class=\"content\">\n<pre>$ git diff -p\ndiff --git a\/src\/onnxstream.cpp b\/src\/onnxstream.cpp\nindex 5ace952..bbc62f6 100644\n--- a\/src\/onnxstream.cpp\n+++ b\/src\/onnxstream.cpp\n@@ -503,7 +503,7 @@ public:\n             throw std::runtime_error(\"failed to initialize XNNPACK\");\n     }\n\n-    ~XnnPack()\n+    ~XnnPack() noexcept(false)^M <b class=\"conum\">(1)<\/b>\n     {\n         for (auto&amp; entry : m_ops_cache)\n         {\ndiff --git a\/src\/onnxstream.h b\/src\/onnxstream.h\nindex 6746f61..9c2755a 100644\n--- a\/src\/onnxstream.h\n+++ b\/src\/onnxstream.h\n@@ -1,5 +1,6 @@                                                                          e           '\n #pragma once\n\n+#include &lt;algorithm&gt;^M <b class=\"conum\">(2)<\/b>\n #include &lt;limits&gt;\n #include &lt;vector&gt;\n #include &lt;functional&gt;<\/pre>\n<\/div>\n<\/div>\n<div class=\"colist arabic\">\n<ol>\n<li>\n<p>\u3053\u3053\u3068<\/p>\n<\/li>\n<li>\n<p>\u3053\u3053\u306e\u7de8\u96c6\u5dee\u5206\u306b ^M<\/p>\n<\/li>\n<\/ol>\n<\/div>\n<div class=\"listingblock\">\n<div class=\"title\">od \u3067\u898b\u308b\u3068\u7de8\u96c6\u7b87\u6240\u3082\u305d\u308c\u4ee5\u5916\u3082 <code>\\r\\n<\/code> \u306b\u306a\u3063\u3066\u3044\u308b<\/div>\n<div class=\"content\">\n<pre>$ head -4 ..\/..\/src\/onnxstream.h | od -xc\n0000000    7023    6172    6d67    2061    6e6f    6563    0a0d    0a0d\n          #   p   r   a   g   m   a       o   n   c   e  \\r  \\n  \\r  \\n\n0000020    6923    636e    756c    6564    3c20    6c61    6f67    6972\n          #   i   n   c   l   u   d   e       &lt;   a   l   g   o   r   i\n0000040    6874    3e6d    0a0d    6923    636e    756c    6564    3c20\n          t   h   m   &gt;  \\r  \\n   #   i   n   c   l   u   d   e       &lt;\n0000060    696c    696d    7374    0d3e    000a\n          l   i   m   i   t   s   &gt;  \\r  \\n\n0000071<\/pre>\n<\/div>\n<\/div>\n<div class=\"paragraph\">\n<p>\u3068\u3044\u3046\u3053\u3068\u3067\u30d5\u30a1\u30a4\u30eb\u306e\u5185\u5bb9\u306f\u554f\u984c\u7121\u3055\u305d\u3046\u3067\u3059\u304c\uff0c git diff \u306e\u8868\u793a\u4e0a\u306e\u554f\u984c\u306e\u3088\u3046\u3067\u3059\uff0e<\/p>\n<\/div>\n<div class=\"paragraph\">\n<p>\u691c\u7d22\u3057\u3066\u4ee5\u4e0b\u306e\u30da\u30fc\u30b8\u3092\u898b\u3064\u3051\u307e\u3057\u305f\uff0e<\/p>\n<\/div>\n<div class=\"ulist\">\n<ul>\n<li>\n<p><a href=\"https:\/\/stackoverflow.com\/questions\/1889559\/make-git-diff-ignore-m\">newline &#8211; Make &#8216;git diff&#8217; ignore ^M &#8211; Stack Overflow<\/a><\/p>\n<\/li>\n<\/ul>\n<\/div>\n<div class=\"paragraph\">\n<p>\u3044\u308d\u3044\u308d\u306a\u65b9\u6cd5\u304c\u66f8\u304b\u308c\u3066\u3044\u307e\u3059\u304c\uff0c\u3061\u3087\u3063\u3068\u8a66\u3057\u305f\u3044\u30ea\u30dd\u30b8\u30c8\u30ea\u306a\u306e\u3067\u6539\u884c\u30b3\u30fc\u30c9\u3092\u5909\u66f4\u3059\u308b\u306e\u3067\u306f\u306a\u304f <code>\\M<\/code> \u306e\u8868\u793a\u3092\u6291\u5236\u3059\u308b\u3088\u3046\u306b\u3057\u305f\u3044\u3067\u3059\uff0e<\/p>\n<\/div>\n<div class=\"paragraph\">\n<p>\u4e00\u756a\u304a\u624b\u8efd\u305d\u3046\u306a\u30b3\u30de\u30f3\u30c9\u30e9\u30a4\u30f3\u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u3044\u304f\u3064\u304b\u8a66\u3057\u307e\u3057\u305f\u304c\u4ee5\u4e0b\u306e\u30aa\u30d7\u30b7\u30e7\u30f3\u306f\u3059\u3079\u3066\u5909\u5316\u304c\u898b\u3089\u308c\u307e\u305b\u3093\u3067\u3057\u305f\uff0e<\/p>\n<\/div>\n<div class=\"listingblock\">\n<div class=\"title\">git diff \u306e\u30aa\u30d7\u30b7\u30e7\u30f3<\/div>\n<div class=\"content\">\n<pre>$ git diff -b\n$ git diff --ignore-cr-at-eol\n$ git diff --ignore-space-change\n$ git diff --ignore-all-space<\/pre>\n<\/div>\n<\/div>\n<div class=\"paragraph\">\n<p>git-config \u306b <code>whitespace = cr-at-eol<\/code> \u3092\u8a2d\u5b9a\u3057\u3066\u307f\u307e\u3059\uff0e <code>CR\/LF<\/code> \u306e\u30d5\u30a1\u30a4\u30eb\u306f\u3042\u307e\u308a\u4f7f\u3046\u3053\u3068\u306f\u306a\u3044\u306e\u3067 <code>--local<\/code> \u306b\u8a2d\u5b9a\u3057\u3066\u304a\u304d\u307e\u3059\uff0e<\/p>\n<\/div>\n<div class=\"listingblock\">\n<div class=\"content\">\n<pre>$ git config --local core.whitespace cr-at-eol\n$ grep cr-at-eol .git\/config\n        whitespace = cr-at-eol<\/pre>\n<\/div>\n<\/div>\n<div class=\"paragraph\">\n<p>\u3053\u306e\u8a2d\u5b9a\u3092\u3059\u308b\u3053\u3068\u3067 <code>^M<\/code> \u304c\u8868\u793a\u3055\u308c\u306a\u304f\u306a\u308a\u307e\u3057\u305f\uff0e<\/p>\n<\/div>\n<div class=\"listingblock\">\n<div class=\"content\">\n<pre>$ git diff\ndiff --git a\/src\/onnxstream.cpp b\/src\/onnxstream.cpp\nindex 5ace952..bbc62f6 100644\n--- a\/src\/onnxstream.cpp\n+++ b\/src\/onnxstream.cpp\n@@ -503,7 +503,7 @@ public:\n             throw std::runtime_error(\"failed to initialize XNNPACK\");\n     }\n\n-    ~XnnPack()\n+    ~XnnPack() noexcept(false)\n     {\n         for (auto&amp; entry : m_ops_cache)\n         {\ndiff --git a\/src\/onnxstream.h b\/src\/onnxstream.h\nindex 6746f61..9c2755a 100644\n--- a\/src\/onnxstream.h\n+++ b\/src\/onnxstream.h\n@@ -1,5 +1,6 @@\n #pragma once\n\n+#include &lt;algorithm&gt;\n #include &lt;limits&gt;\n #include &lt;vector&gt;\n #include &lt;functional&gt;<\/pre>\n<\/div>\n<\/div>\n<div class=\"listingblock\">\n<div class=\"title\">\u74b0\u5883<\/div>\n<div class=\"content\">\n<pre>$ git --version\ngit version 2.45.2\n$ dpkg-query -W git\ngit     1:2.45.2-1\n$ lsb_release -dr\nDescription:    Debian GNU\/Linux trixie\/sid\nRelease:        n\/a\n$ arch\nx86_64<\/pre>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>git diff \u3067\u5909\u7a2e\u7b87\u6240\u3060\u3051 ^M \u304c\u4ed8\u3044\u3066\u308b\u306e\u306b\u6c17\u3065\u304d\u307e\u3057\u305f\uff0e \u7de8\u96c6\u30df\u30b9\u3066\u6539\u884c\u30b3\u30fc\u30c9\u3092\u9593\u9055\u3048\u305f\u304b\u3068\u601d\u3063\u305f\u3051\u3069\u5143\u3005 \\r\\n \u306a\u30d5\u30a1\u30a4\u30eb\u3067\u7de8\u96c6\u7b87\u6240\u4ee5\u5916\u3082\u540c\u3058 \\r\\n \u3067\u3059\uff0e \u3067\u3082\u975e\u7de8\u96c6\u7b87\u6240\u306f ^M \u304c\u51fa\u307e\u305b\u3093\uff0e<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"webmentions_disabled_pings":false,"webmentions_disabled":false,"activitypub_content_warning":"","activitypub_content_visibility":"","activitypub_max_image_attachments":4,"activitypub_interaction_policy_quote":"anyone","activitypub_status":"federated","footnotes":""},"categories":[7,6,199],"tags":[586,828,556,829],"class_list":["post-4080","post","type-post","status-publish","format-standard","hentry","category-debian-linux","category-linux","category-sid","tag-git","tag-git-diff","tag-include","tag-pragma"],"_links":{"self":[{"href":"https:\/\/matoken.org\/blog\/wp-json\/wp\/v2\/posts\/4080","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/matoken.org\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/matoken.org\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/matoken.org\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/matoken.org\/blog\/wp-json\/wp\/v2\/comments?post=4080"}],"version-history":[{"count":3,"href":"https:\/\/matoken.org\/blog\/wp-json\/wp\/v2\/posts\/4080\/revisions"}],"predecessor-version":[{"id":4083,"href":"https:\/\/matoken.org\/blog\/wp-json\/wp\/v2\/posts\/4080\/revisions\/4083"}],"wp:attachment":[{"href":"https:\/\/matoken.org\/blog\/wp-json\/wp\/v2\/media?parent=4080"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/matoken.org\/blog\/wp-json\/wp\/v2\/categories?post=4080"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/matoken.org\/blog\/wp-json\/wp\/v2\/tags?post=4080"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}