From: rsbecker@nexbridge.com Date: Thu, 30 Dec 2021 12:26:33 GMT Subject: RE: Git Diff feature request Message-ID: <00dd01d7fd78$7e69e150$7b3da3f0$@nexbridge.com> In-Reply-To: <52591f5d-d4b5-90ea-e84e-32b99803a3e6@gmail.com> On December 30, 2021 6:33 AM, Nick Gearls wrote: > On top of the option ignore-all-space, it would be very handy (for several > programming languages) to have an additional option ignore-all-space-and- > eol where the following snippets would be equivalent: > > if (...) a = 1 > > if (...) > a = 1 One interesting technique I have seen used is to set up a pre-commit hook and/or clean filter to format code according to corporate/team standards. Reprocessing code prior to the commit would allow a normalization of coding standards and removing of EOL or space/tab concerns. So even if a developer did if (...) a= 1 By the time it reaches the repo, it looks like if (...) a = 1 We use a similar technique (enforced only by policy right now, not a hook), which is to require code to run through standard IDE source formatting. Improperly formatted code hitting pull requests gets a decline until the code is properly formatted. A pull request diff might not include an above suggested diff option. --Randall