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:23:13 -0700 [thread overview]
Message-ID: <7vtyefg8fi.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <7vbp0pg4d7.fsf@alter.siamese.dyndns.org> (Junio C. Hamano's message of "Fri, 01 Apr 2011 12:26:28 -0700")
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').
diff.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/diff.c b/diff.c
index 5c66a53..05f443c 100644
--- a/diff.c
+++ b/diff.c
@@ -572,11 +572,14 @@ static void emit_rewrite_diff(const char *name_a,
line_prefix, metainfo, a_name.buf, name_a_tab, reset,
line_prefix, metainfo, b_name.buf, name_b_tab, reset,
line_prefix, fraginfo);
- print_line_count(o->file, lc_a);
+ if (!o->irreversible_delete)
+ print_line_count(o->file, lc_a);
+ else
+ fprintf(o->file, "?,?");
fprintf(o->file, " +");
print_line_count(o->file, lc_b);
fprintf(o->file, " @@%s\n", reset);
- if (lc_a)
+ if (lc_a && !o->irreversible_delete)
emit_rewrite_lines(&ecbdata, '-', data_one, size_one);
if (lc_b)
emit_rewrite_lines(&ecbdata, '+', data_two, size_two);
next prev parent reply other threads:[~2011-04-03 6:23 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 [this message]
2011-04-03 6:38 ` Junio C Hamano
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=7vtyefg8fi.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).