From: Jakub Narebski <jnareb@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] diff: Make numstat machine friendly also for renames (and copies)
Date: Tue, 11 Dec 2007 00:14:47 +0100 [thread overview]
Message-ID: <200712110014.48343.jnareb@gmail.com> (raw)
In-Reply-To: <7vir36jgty.fsf@gitster.siamese.dyndns.org>
Junio C Hamano wrote:
> Jakub Narebski <jnareb@gmail.com> writes:
>
> > "git diff --numstat" used the same format as "git diff --stat" for
> > renamed (and copied) files, except that filenames were not shortened
> > when they didn't fit in the column width. This format is suitable for
> > human consumption, but it cannot be unambiguously parsed.
>
> Agreed about the (un)parsability, and --numstat is all about parsability
> so I would not object. A fix is really needed there.
>
> I do not have time to look at the patch right now, but if the changed
> output is in line with what --name-status would show, that would be
> great. I'd call that "the format that should have been from day one".
>
> I.e. no '=>' rename marker, but show two names c-quoted (unless -z is
> used) and separated with inter_name_termination). IIRC, that is how
> rename/copy is shown with --name-status.
Unfortunately this is not possible, at least if we want to retain
the assertion that -z output looks like normal output, only without
quoting.
diff --name-status has _status_ field which can be used to distinguish
if the NUL (for -z output) is the end of source filename, or the end
of record.
The patch send changes --numstat to use only _destination_ name.
What you want I'd left for futore --numstat-extended (basically --numstat,
but with status field.
--
Jakub Narebski
Poland
prev parent reply other threads:[~2007-12-10 23:15 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-10 22:32 [PATCH] diff: Make numstat machine friendly also for renames (and copies) Jakub Narebski
2007-12-10 22:55 ` [PATCH (amend)] " Jakub Narebski
2007-12-11 1:06 ` Junio C Hamano
2007-12-11 1:26 ` Jakub Narebski
2007-12-11 2:50 ` Junio C Hamano
2007-12-11 23:09 ` Jakub Narebski
2007-12-12 7:46 ` Junio C Hamano
2007-12-12 10:21 ` Jakub Narebski
2007-12-12 10:31 ` Jakub Narebski
2007-12-12 19:07 ` Junio C Hamano
2007-12-10 23:00 ` [PATCH] " Junio C Hamano
2007-12-10 23:14 ` Jakub Narebski [this message]
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=200712110014.48343.jnareb@gmail.com \
--to=jnareb@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
/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).