git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* git diff: add option for omitting the contents of deletes
@ 2011-02-26 13:16 Mart Sõmermaa
  2011-02-26 20:11 ` Junio C Hamano
  0 siblings, 1 reply; 32+ messages in thread
From: Mart Sõmermaa @ 2011-02-26 13:16 UTC (permalink / raw)
  To: git

Paging through deletes adds a cognitive burden when reviewing code.
Thus we have

    git config --global alias.deleteless-diff 'diff -M --diff-filter=ACMRTUXB'

and using `git deleteless-diff` is standard practice during code reviews.

However, the filter leaves out delete information altogether, which is
error-prone.

Therefore I'd like to propose adding the -D (or
--omit-delete-contents) option to git diff
that would behave as follows:

$ git rm foo
$ git diff -D
diff --git a/foo b/foo
delete foo

I.e. instead of displaying the contents of the file as a diff minus, a
descriptive message
is displayed -- like with renames.

Thoughts, suggestions?
Can 'diff -M --diff-filter=ACMRTUXB' be improved?

Best regards,
Mart Sõmermaa

^ permalink raw reply	[flat|nested] 32+ messages in thread

end of thread, other threads:[~2011-03-08 21:31 UTC | newest]

Thread overview: 32+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-26 13:16 git diff: add option for omitting the contents of deletes Mart Sõmermaa
2011-02-26 20:11 ` Junio C Hamano
2011-02-27 14:41   ` Michael J Gruber
2011-02-27 22:33     ` Mart Sõmermaa
2011-02-28  9:58       ` Michael J Gruber
2011-02-28 10:51         ` Mart Sõmermaa
2011-02-27 22:54     ` Junio C Hamano
2011-02-27 23:07       ` Junio C Hamano
2011-02-28  7:31         ` Michael J Gruber
2011-02-28 12:17           ` Jeff King
2011-02-28 12:23             ` Jeff King
2011-02-28 12:32               ` Michael J Gruber
2011-02-28 12:59                 ` Jeff King
2011-02-28 13:05                   ` Michael J Gruber
2011-02-28 21:54                     ` Jeff King
2011-02-28 18:11               ` Junio C Hamano
2011-02-28 22:23                 ` Jeff King
2011-02-28 23:28                   ` Junio C Hamano
2011-03-01  0:11                     ` Junio C Hamano
2011-03-07 20:38                       ` Mart Sõmermaa
2011-03-08  7:14                         ` Michael J Gruber
2011-03-08 19:49                         ` Junio C Hamano
2011-03-08 21:25                           ` Mart Sõmermaa
2011-03-08 21:31                             ` Jeff King
2011-02-28 12:42             ` symling diff driver (Was: Re: git diff: add option for omitting the contents of deletes) Michael J Gruber
2011-02-28 13:08               ` Jeff King
2011-02-28 15:26                 ` [PATCH/WIP] attr: make attributes depend on file type Michael J Gruber
2011-02-28 17:30                   ` Jeff King
2011-02-28 17:48                     ` Junio C Hamano
2011-03-01  7:46                       ` Michael J Gruber
2011-02-28 10:45         ` git diff: add option for omitting the contents of deletes Mart Sõmermaa
2011-02-28 16:10           ` Michael J Gruber

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).