git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Michael J Gruber <git@drmicha.warpmail.net>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] git diff -D: omit the preimage of deletes
Date: Sat, 02 Apr 2011 23:38:56 -0700	[thread overview]
Message-ID: <7vpqp3g7pb.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <7vtyefg8fi.fsf@alter.siamese.dyndns.org> (Junio C. Hamano's message of "Sat, 02 Apr 2011 23:23:13 -0700")

Junio C Hamano <gitster@pobox.com> writes:

> Junio C Hamano <gitster@pobox.com> writes:
>
>> I would have expected that the patch relative to jc/diff-irreversible-delete
>> topic would consist only of changes to diff.c:emit_rewrite_diff(), docs
>> and tests.
>
> Here is an "in other words" follow-up.  Your tests looked reasonable (and
> pass with this patch on top of what has been queued in 'pu').

And this is the documentation part, based on your version but somewhat
rewritten.  Your version said "cannot be applied with -R", but at the
mechanical application level, the format is deliberately designed to make
`patch` and `git apply` to fail, and I think that should be mentioned
together with the reason why such an option exists (i.e. for human eyeball
consumption).

I'll squash these two to what is queued in 'pu'.  We may want to polish it
again after 1.7.5 but I think it is in much better shape now.

Thanks.

 Documentation/diff-options.txt |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/Documentation/diff-options.txt b/Documentation/diff-options.txt
index c93124b..30a00d3 100644
--- a/Documentation/diff-options.txt
+++ b/Documentation/diff-options.txt
@@ -259,6 +259,19 @@ endif::git-log[]
 	projects, so use it with caution.  Giving more than one
 	`-C` option has the same effect.
 
+-D::
+--irreversible-delete::
+	Omit the preimage for deletes, i.e. print only the header but not
+	the diff between the preimage and `/dev/null`. The resulting patch
+	is not meant to be applied with `patch` nor `git apply`; this is
+	solely for people who want to just concentrate on reviewing the
+	text after the change. In addition, the output obviously lack
+	enough information to apply such a patch in reverse, even manually,
+	hence the name of the option.
++
+When used together with `-B`, omit also the preimage in the deletion part
+of a delete/create pair.
+
 -l<num>::
 	The `-M` and `-C` options require O(n^2) processing time where n
 	is the number of potential rename/copy targets.  This

  reply	other threads:[~2011-04-03  6:39 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-31 22:26 What's cooking in git.git (Mar 2011, #06; Thu, 31) Junio C Hamano
2011-03-31 22:35 ` Let's make our cycles shorter Junio C Hamano
2011-04-25  0:34   ` Sebastien Douche
2011-04-25 17:03     ` Junio C Hamano
2011-06-13  0:45       ` Sebastien Douche
2011-04-01 13:31 ` [PATCH] git diff -D: omit the preimage of deletes Michael J Gruber
2011-04-01 19:26   ` Junio C Hamano
2011-04-03  6:23     ` Junio C Hamano
2011-04-03  6:38       ` Junio C Hamano [this message]
2011-04-03 12:51     ` Michael J Gruber
2011-04-01 15:26 ` What's cooking in git.git (Mar 2011, #06; Thu, 31) Jeff King
2011-04-01 17:01   ` Junio C Hamano
2011-04-01 17:06     ` Jeff King

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

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7vpqp3g7pb.fsf@alter.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=git@drmicha.warpmail.net \
    --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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).