From: Linus Torvalds <torvalds@osdl.org>
To: Junio C Hamano <junkio@cox.net>
Cc: git@vger.kernel.org, pasky@ucw.cz
Subject: Re: [PATCH 0/1] Diff-helper update
Date: Wed, 18 May 2005 08:41:21 -0700 (PDT) [thread overview]
Message-ID: <Pine.LNX.4.58.0505180821470.18337@ppc970.osdl.org> (raw)
In-Reply-To: <7v3bslqc94.fsf@assigned-by-dhcp.cox.net>
On Tue, 17 May 2005, Junio C Hamano wrote:
>
> This is just a cover letter but the next patch implements the
> rename detection I told you about.
Ok. I now have one more worry: git-diff-tree with "--stdin".
I actually find that thing to be surpremely useful, and I use it for not
just my silly git-whatchanged script, but also to make release notes. I
just do
git-rev-tree HEAD ^LAST_RELEASE | cut -d' ' -f2 | git-diff-tree -v -s --stdin
and that's wonderful. And sometimes I use "-p" instead of "-s", because
I'm not making release notes, but because I'm doing a "whatchanged" with
full diffs.
In other words, try something like this on the kernel tree:
git-whatchanged -p include/asm-i386 arch/i386 | less -S
and stare in wonder at just how _useful_ this simple thing is.
Maybe it's just that I've not used all that many different SCM systems,
and I've certainly not used all the features of the ones I _have_ used, so
maybe I never knew, but dammit, I've never seen anybody else do something
quite that useful (at least doing it fast enough that it _remains_
useful).
(Replace "arch/i386" with "drivers/usb" or "fs/ext3" or whatever,
depending on just what your area of interest happens to be).
In other words, I'm very happy with git.
However, git-diff-helper doesn't understand these things, and the builtin
diff doesn't do the rename thing. Yet it would be very very useful to do.
Now, if you do just a
git-whatchanged include/asm-i386 arch/i386
(or you can even use "-z" if you want to), it turns out hat git-diff-tree
actually does output perfectly usable material. Each "set of diffs" is
clearly separated, and there is no ambiguos material: all lines are
either:
- empty or start with a whitespace
- start with "diff-tree ", "Author: " or "Date: "
- are valid input for diff-helper
So what I'd suggest is one (or both) of two possibilities:
- make the internal diff logic also able to do the same rename handling
as the external diff-helper. This may or may not be complex, I've not
looked at it.
- change diff-helper subtly: instead of printing "cannot parse %s", any
nonrecognized line would be a "ignore this line, but process all
pending potential renames".
The above would mean that I could either just do
git-whatchanged include/asm-i386 arch/i386 | git-diff-helper
or continue to use
git-whatchanged -p include/asm-i386 arch/i386
and still get the "nice" output (and it's a _feature_ that a rename within
the arch/i386 then shows up as a rename, but a rename that crosses the
boundary shows up as a "create" or "delete" event).
Comments?
Linus
next prev parent reply other threads:[~2005-05-18 15:57 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-05-18 6:28 [PATCH 0/1] Diff-helper update Junio C Hamano
2005-05-18 15:41 ` Linus Torvalds [this message]
2005-05-18 17:58 ` Junio C Hamano
2005-05-18 18:14 ` Linus Torvalds
2005-05-18 18:38 ` Linus Torvalds
2005-05-18 18:52 ` Thomas Glanzmann
2005-05-18 20:30 ` Junio C Hamano
2005-05-18 20:39 ` Linus Torvalds
2005-05-18 23:54 ` Junio C Hamano
2005-05-19 11:11 ` Junio C Hamano
2005-05-19 2:05 ` [preview] diff-helper rename detection Junio C Hamano
2005-05-19 3:01 ` Linus Torvalds
2005-05-19 3:08 ` Junio C Hamano
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=Pine.LNX.4.58.0505180821470.18337@ppc970.osdl.org \
--to=torvalds@osdl.org \
--cc=git@vger.kernel.org \
--cc=junkio@cox.net \
--cc=pasky@ucw.cz \
/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).