From: Jakub Narebski <jnareb@gmail.com>
To: "Jon Smirl" <jonsmirl@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: git diff with add/modified codes
Date: Sun, 29 Jul 2007 23:36:13 +0200 [thread overview]
Message-ID: <200707292336.14473.jnareb@gmail.com> (raw)
In-Reply-To: <9e4733910707281107w6aff86f5sf746ca3f2c74d098@mail.gmail.com>
On Sat, 28 July 2007, Jon Smirl wrote:
> On 7/28/07, Jakub Narebski <jnareb@gmail.com> wrote:
>> Jeff King wrote:
>>
>>> On Fri, Jul 27, 2007 at 08:17:54PM -0400, Jon Smirl wrote:
>>>
>>>> That's not what I want. I'm looking a report that indicates new files
>>>> vs modified ones in a single list. These old patches I am working with
>>>> often create 100 files and modify another 200.
>>>>
>>>> Adding a code like (Added (A), Copied (C), Deleted (D), Modified (M),
>>>> Renamed (R)) to --stat would be perfect.
>>>
>>> How about --name-status?
>>
>> Or -r --name-status?
>
> -r is not in the git diff doc but it is used in the examples.
> http://www.kernel.org/pub/software/scm/git/docs/git-diff.html
<quote>
<2> show only names and the nature of change, but not actual
diff output. --name-status disables usual patch generation
which in turn also disables recursive behavior, so without -r
you would only see the directory name if there is a change in a
file in a subdirectory.
</quote>
"Of course" one knows that "git diff <tree-ish> <tree-ish>" is
git-diff-tree in disguise, and accepts git-diff-tree options.
By the way, I was thinking about extending --numstat output to include
also status. Current --numstat output is ill fitted to deal with renames
and copies, at least ill fitted for machine consumption of renames
output; it uses "old_name => new_name" as a filename for renames. While
it would be fairly easy to put pre- and after-rename names separated
by TAB, and quoted if needed (including embedded TAB character in
the filename, which would be quoted as \t instead) without breaking
anu current --numstat output parsers (although I don't think any of
them uses -M/-C), it would be hard to do the same for --numstat -z output.
A solution (not best, I admit) would be to use NUL NUL to separate pre-
and post-image filename, but I think it would be best to add new
--numstat-extended format to git-diff.
P.S. Is binary diff output described somewhere?
--
Jakub Narebski
Poland
next prev parent reply other threads:[~2007-07-29 22:51 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-27 22:05 git diff with add/modified codes Jon Smirl
2007-07-27 23:22 ` Junio C Hamano
2007-07-28 0:17 ` Jon Smirl
2007-07-28 4:39 ` Jeff King
2007-07-28 15:26 ` Jakub Narebski
2007-07-28 18:07 ` Jon Smirl
2007-07-29 21:36 ` Jakub Narebski [this message]
2007-07-28 0:48 ` Johannes Schindelin
2007-07-28 0:54 ` Jon Smirl
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=200707292336.14473.jnareb@gmail.com \
--to=jnareb@gmail.com \
--cc=git@vger.kernel.org \
--cc=jonsmirl@gmail.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).