git diff: add option for omitting the contents of deletes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]