From: "Mart Sõmermaa" <mrts.pydev@gmail.com>
To: git@vger.kernel.org
Subject: git diff: add option for omitting the contents of deletes
Date: Sat, 26 Feb 2011 15:16:46 +0200 [thread overview]
Message-ID: <AANLkTi=++gcw5CDQnTRbhUGkvWc9Zm+Ct4Zm5oGGYKUh@mail.gmail.com> (raw)
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
next reply other threads:[~2011-02-26 13:16 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-26 13:16 Mart Sõmermaa [this message]
2011-02-26 20:11 ` git diff: add option for omitting the contents of deletes 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='AANLkTi=++gcw5CDQnTRbhUGkvWc9Zm+Ct4Zm5oGGYKUh@mail.gmail.com' \
--to=mrts.pydev@gmail.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).