* Git Diff feature request
@ 2021-12-30 11:33 Nick Gearls
2021-12-30 12:26 ` rsbecker
0 siblings, 1 reply; 5+ messages in thread
From: Nick Gearls @ 2021-12-30 11:33 UTC (permalink / raw)
To: git
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
Thanks
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: Git Diff feature request
2021-12-30 11:33 Git Diff feature request Nick Gearls
@ 2021-12-30 12:26 ` rsbecker
2021-12-31 11:15 ` Erik Cervin Edin
0 siblings, 1 reply; 5+ messages in thread
From: rsbecker @ 2021-12-30 12:26 UTC (permalink / raw)
To: nickgearls, git
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Git Diff feature request
2021-12-30 12:26 ` rsbecker
@ 2021-12-31 11:15 ` Erik Cervin Edin
2022-01-03 7:53 ` Nick Gearls
[not found] ` <83d398ce-caba-34f7-3727-3e7f5d396127@gmail.com>
0 siblings, 2 replies; 5+ messages in thread
From: Erik Cervin Edin @ 2021-12-31 11:15 UTC (permalink / raw)
To: rsbecker; +Cc: nickgearls, git
On Fri, Dec 31, 2021 at 11:23 AM <rsbecker@nexbridge.com> wrote:
> 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.
> ...
> 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.
I agree with Randall, the easiest solution is to adhere to a formatting standard
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Git Diff feature request
2021-12-31 11:15 ` Erik Cervin Edin
@ 2022-01-03 7:53 ` Nick Gearls
[not found] ` <83d398ce-caba-34f7-3727-3e7f5d396127@gmail.com>
1 sibling, 0 replies; 5+ messages in thread
From: Nick Gearls @ 2022-01-03 7:53 UTC (permalink / raw)
To: Erik Cervin Edin, rsbecker; +Cc: git
When you want to compare 2 versions of a repo you don't own, you don't
have the option to apply a formatting standard ...
On 31-12-2021 12:15, Erik Cervin Edin wrote:
> On Fri, Dec 31, 2021 at 11:23 AM<rsbecker@nexbridge.com> wrote:
>> 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.
>> ...
>> 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.
> I agree with Randall, the easiest solution is to adhere to a formatting standard
^ permalink raw reply [flat|nested] 5+ messages in thread
[parent not found: <83d398ce-caba-34f7-3727-3e7f5d396127@gmail.com>]
end of thread, other threads:[~2022-01-03 10:14 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-30 11:33 Git Diff feature request Nick Gearls
2021-12-30 12:26 ` rsbecker
2021-12-31 11:15 ` Erik Cervin Edin
2022-01-03 7:53 ` Nick Gearls
[not found] ` <83d398ce-caba-34f7-3727-3e7f5d396127@gmail.com>
2022-01-03 10:14 ` Erik Cervin Edin
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.