{"thread":{"id":"32429","subject":"git diff --ignore-space-at-eol issue","startedAt":"2012-12-21T15:04:31Z","lastAt":"2012-12-28T20:33:24Z","messageCount":4,"participants":["John Moon","Antoine Pelisse"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"205337","messageId":"BLU163-W40634B340214076467C88ECF360@phx.gbl","threadId":"32429","inReplyTo":null,"subject":"git diff --ignore-space-at-eol issue","fromName":"John Moon","fromEmail":"johnmoon77@hotmail.com","sentAt":"2012-12-21T15:04:31Z","receivedAt":"2012-12-21T15:04:31Z","isPatch":false,"sender":{"key":"johnmoon77@hotmail.com","avatar":null},"body":"\nHi all,\n\nThe --ignore-space-at-eol option is ignored when used in conjunction \nwith --name-status.\nIt works fine otherwise.\n\n$ git init\nInitialized empty Git repository in /tmp/test/.git/\n$ printf \"hello\\r\\n\" > test.txt\n$git -c core.autocrlf=false add test.txt\n$git commit -m.\n[master (root-commit) 5c4ce92] .\n1 file changed, 1 insertion(+)\ncreate mode 100644 test.txt\n$ printf \"hello\" > test.txt\n$ git diff --ignore-space-at-eol test.txt\n$ git diff --stat --ignore-space-at-eol test.txt\n0 files changed\n$ git diff --name-status --ignore-space-at-eol test.txt\nM test.txt\n\n\nThanks.\n\n \t\t \t   \t\t  "},{"id":"205592","messageId":"CALWbr2y3BdqcD-62jhPSQsK3U=8-Dc=R-jxg8H0yqpgVfdHJXw@mail.gmail.com","threadId":"32429","inReplyTo":"BLU163-W40634B340214076467C88ECF360@phx.gbl","subject":"Re: git diff --ignore-space-at-eol issue","fromName":"Antoine Pelisse","fromEmail":"apelisse@gmail.com","sentAt":"2012-12-28T16:46:10Z","receivedAt":"2012-12-28T16:46:10Z","isPatch":false,"sender":{"key":"apelisse@gmail.com","avatar":"https://avatars.githubusercontent.com/u/1929644?v=4"},"body":"> The --ignore-space-at-eol option is ignored when used in conjunction\n> with --name-status.\n> It works fine otherwise.\n\nIndeed the behavior of diff --stat, and etc has been corrected very\nrecently to make it more consistent across all options.\nI don't know if the new behavior is exactly what you expected:\n\n$ git diff --ignore-space-at-eol test.txt\n$ git diff --ignore-space-at-eol --stat test.txt\n test.txt | 0\n 1 file changed, 0 insertions(+), 0 deletions(-)\n$ git diff --ignore-space-at-eol --name-status test.txt\nM       test.txt\n\nThe idea is that even though diff doesn't show any differences, stat,\nshortstat, numstat and name-status reports the file as being changed.\nThis is available since v1.8.1-rc0.\n"},{"id":"205601","messageId":"BLU163-W51DAB90003C969CDF837A2CF3F0@phx.gbl","threadId":"32429","inReplyTo":"CALWbr2y3BdqcD-62jhPSQsK3U=8-Dc=R-jxg8H0yqpgVfdHJXw@mail.gmail.com","subject":"RE: git diff --ignore-space-at-eol issue","fromName":"John Moon","fromEmail":"johnmoon77@hotmail.com","sentAt":"2012-12-28T19:59:27Z","receivedAt":"2012-12-28T19:59:27Z","isPatch":false,"sender":{"key":"johnmoon77@hotmail.com","avatar":null},"body":"\n\n> $ git diff --ignore-space-at-eol test.txt\n> $ git diff --ignore-space-at-eol --stat test.txt\n> test.txt | 0\n> 1 file changed, 0 insertions(+), 0 deletions(-)\n> $ git diff --ignore-space-at-eol --name-status test.txt\n> M test.txt\n>\n> The idea is that even though diff doesn't show any differences, stat,\n> shortstat, numstat and name-status reports the file as being changed.\n> This is available since v1.8.1-rc0.\n\nThanks for the info.  Unfortunately it's not what i would expect.  \nIf i told git diff specifically to ignore line endings, why is --name-status  showing me a file as being modified when the only modification is the very thing i told it to ignore.  \nThe same thing for --stat, why is it showing me a file with zero changes?  Just my opinion though.\n\nI'll tell you why this is a problem for me, basically what i am doing is running the \"git diff --ignore-space-at-eol --name-status \"  on my root directory to give to someone else who is not using git to give them the files that i have modified.  I don't want to give them a file where only the line ending has changed.\n\nCheers. \t\t \t   \t\t  "},{"id":"205604","messageId":"CALWbr2zSe6GEy=_7SXqRocKwhXauXmP7eMMmDur4Vg7npqBPyg@mail.gmail.com","threadId":"32429","inReplyTo":"BLU163-W51DAB90003C969CDF837A2CF3F0@phx.gbl","subject":"Re: git diff --ignore-space-at-eol issue","fromName":"Antoine Pelisse","fromEmail":"apelisse@gmail.com","sentAt":"2012-12-28T20:33:24Z","receivedAt":"2012-12-28T20:33:24Z","isPatch":false,"sender":{"key":"apelisse@gmail.com","avatar":"https://avatars.githubusercontent.com/u/1929644?v=4"},"body":"Then you should give the output of diff --stat, and he will be able to\nignore files with no changes.\n\nThe change was originally made for permission changes. diff --stat\nneeds to show files have changed even though, indeed, there is no diff\noutput.\n\nYou could also use --numstat and filter out files with no changes\n(starting by 0 0).\n\nOn Fri, Dec 28, 2012 at 8:59 PM, John Moon <johnmoon77@hotmail.com> wrote:\n>\n>\n>> $ git diff --ignore-space-at-eol test.txt\n>> $ git diff --ignore-space-at-eol --stat test.txt\n>> test.txt | 0\n>> 1 file changed, 0 insertions(+), 0 deletions(-)\n>> $ git diff --ignore-space-at-eol --name-status test.txt\n>> M test.txt\n>>\n>> The idea is that even though diff doesn't show any differences, stat,\n>> shortstat, numstat and name-status reports the file as being changed.\n>> This is available since v1.8.1-rc0.\n>\n> Thanks for the info.  Unfortunately it's not what i would expect.\n> If i told git diff specifically to ignore line endings, why is --name-status  showing me a file as being modified when the only modification is the very thing i told it to ignore.\n> The same thing for --stat, why is it showing me a file with zero changes?  Just my opinion though.\n>\n> I'll tell you why this is a problem for me, basically what i am doing is running the \"git diff --ignore-space-at-eol --name-status \"  on my root directory to give to someone else who is not using git to give them the files that i have modified.  I don't want to give them a file where only the line ending has changed.\n>\n> Cheers.\n"}]}