Re: git diff: add option for omitting the contents of deletes
- From
Michael J Gruber <git@drmicha.warpmail.net>
- Date
- Mar 8, 2011, 07:14 UTC
- Message-ID
- <4D75D768.1080701@drmicha.warpmail.net>
- In-Reply-To
- <AANLkTinBTWPrAOq9BOkBJc5GOhFkzsr__9wqEWnWdwYR@mail.gmail.com>
Mart Sõmermaa venit, vidit, dixit 07.03.2011 21:38:
Show 20 quoted lines
> On Tue, Mar 1, 2011 at 2:11 AM, Junio C Hamano <gitster@pobox.com> wrote: >> In any case, a minimum patch to give what Mart wanted to see would >> probably look like this. I'll leave bugfixes, documentation and tests to >> the readers ;-). > > The minimum looks to be the optimum -- IMHO this is entirely sufficient, > thank you very much! > > What would the bugfixes be (i.e. do you have any doubts about the > implementation)? > The change looks quite straightforward, to the point and bug-free to my eyes. > > I try to get to writing tests ASAP. > > As for the documentation, would the following section be sufficient in > Documentation/diff-options.txt? > > -D:: > --irreversible-delete:: > Omit file contents when file has been deleted and only
"if the file has"
> output the header. This is useful during diff review > but should not be used in actual patches as these would > be non-reversible due to the omitted file contents.
With the current state of git-apply, they could not even be applied, so maybe:
but produces patches which can not be applied by linkgit:git-apply[1].
You can revert to the previous description once you've taught git-apply the new diff header :)
Michael