{"thread":{"id":"47743","subject":"how to ignore whitespace changes with --color-moved (git diff move detection)?","startedAt":"2018-02-02T02:14:30Z","lastAt":"2018-02-02T18:23:50Z","messageCount":3,"participants":["Timothee Cour","Jeff King","Stefan Beller"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"338068","messageId":"CANri+EwfsgS-s0TeeX0E6XoCnmCeq=CB0UDQ9=gjSXbe8C_5GQ@mail.gmail.com","threadId":"47743","inReplyTo":null,"subject":"how to ignore whitespace changes with --color-moved (git diff move detection)?","fromName":"Timothee Cour","fromEmail":"thelastmammoth@gmail.com","sentAt":"2018-02-02T02:13:52Z","receivedAt":"2018-02-02T02:14:30Z","isPatch":false,"sender":{"key":"thelastmammoth@gmail.com","avatar":null},"body":"this PR from october 2017 was discussing a patch that'd introduce\n`--color-moved-[no-]ignore-space-change`\nhttps://public-inbox.org/git/20171025224620.27657-3-sbeller@google.com/\n\nhowever not sure what happened since then as I can't find in `git help\ndiff` options even after `brew install --HEAD git`\n\nit's a really useful feature as it's a common use case (ppl move\nblocks and reformat in same PR)\n\nIf it's not merged in git repo yet is there an easy way to try out\nthis feature? (even if experimental)\n"},{"id":"338079","messageId":"20180202065146.GA16533@sigill.intra.peff.net","threadId":"47743","inReplyTo":"CANri+EwfsgS-s0TeeX0E6XoCnmCeq=CB0UDQ9=gjSXbe8C_5GQ@mail.gmail.com","subject":"Re: how to ignore whitespace changes with --color-moved (git diff move detection)?","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2018-02-02T06:51:47Z","receivedAt":"2018-02-02T06:51:53Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Thu, Feb 01, 2018 at 06:13:52PM -0800, Timothee Cour wrote:\n\n> this PR from october 2017 was discussing a patch that'd introduce\n> `--color-moved-[no-]ignore-space-change`\n> https://public-inbox.org/git/20171025224620.27657-3-sbeller@google.com/\n> \n> however not sure what happened since then as I can't find in `git help\n> diff` options even after `brew install --HEAD git`\n> \n> it's a really useful feature as it's a common use case (ppl move\n> blocks and reformat in same PR)\n\nI think you can still do \"--color-moved -w\" to ignore whitespace. It's\njust that the defaults did not end up getting flipped.\n\n-Peff\n"},{"id":"338104","messageId":"CAGZ79kZX2FsEjD04zr5-oufU6dLhiOhBkxv4u8VEwL0OPRFtiA@mail.gmail.com","threadId":"47743","inReplyTo":"CANri+EwfsgS-s0TeeX0E6XoCnmCeq=CB0UDQ9=gjSXbe8C_5GQ@mail.gmail.com","subject":"Re: how to ignore whitespace changes with --color-moved (git diff move detection)?","fromName":"Stefan Beller","fromEmail":"sbeller@google.com","sentAt":"2018-02-02T18:23:28Z","receivedAt":"2018-02-02T18:23:50Z","isPatch":false,"sender":{"key":"stefanbeller@gmail.com","avatar":"https://avatars.githubusercontent.com/u/455868?v=4"},"body":"On Thu, Feb 1, 2018 at 6:13 PM, Timothee Cour <thelastmammoth@gmail.com> wrote:\n> this PR from october 2017 was discussing a patch that'd introduce\n> `--color-moved-[no-]ignore-space-change`\n> https://public-inbox.org/git/20171025224620.27657-3-sbeller@google.com/\n>\n> however not sure what happened since then as I can't find in `git help\n> diff` options even after `brew install --HEAD git`\n\nI proposed it, but it wasn't going anywhere, because we seemed to have\na little disagreement over how a reasonable UX looks like.\n\nThe previous patch[1] in the series you link to, proposed 6 new\ncommand line flags (3 flags + their negatives), which was deemed\ninappropriate for the user (\"which combination of these flags do you\nneed to give to get a good result?\"), but I cannot find a reference for\nthat, I just vaguely recall that discussion.\n\n[1] https://public-inbox.org/git/20171025224620.27657-2-sbeller@google.com/\n\n\n> it's a really useful feature as it's a common use case (ppl move\n> blocks and reformat in same PR)\n\nThanks for the encouraging words. For now you can\nuse '--color-moved -w' as Jeff King suggests, but that may\nnot be exactly what you want, because this\n* creates the diff ignoring whitespaces\n* and then colors the moved lines (also ignoring white spaces)\nbut when you want to\n* obtain a real diff (no trickery with whitespaces)\n* and then have some coloring aid ignoring white spaces\nyou are out of luck for now. Maybe you have a good idea for\nthe UX design? (What do we need there? Maybe an option\nequivalent of `--color-moved-[no]-ignore-all-space` is sufficient\nfor all practical purposes?)\n\n> If it's not merged in git repo yet is there an easy way to try out\n> this feature? (even if experimental)\n\nCan you compile Git yourself instead of installing it from homebrew?\n(See \"Build Git from source on OS X\" on\nhttps://www.atlassian.com/git/tutorials/install-git for example)\nIn that case, you can just patch your local version of Git with the\npatches that you found. Download them as raw, and \"git am\"\nthem before running make.\n\nStefan\n"}]}