From: David Ho <davidkwho@gmail.com>
To: git@vger.kernel.org
Subject: git-diff-tree rename detection for single file
Date: Tue, 18 Oct 2005 15:56:06 -0400 [thread overview]
Message-ID: <4dd15d180510181256i1c5a82d9ld62acaedb493cf71@mail.gmail.com> (raw)
Hi,
I have a small suggestion to make the diff of a renamed file a bit
more meaningful. I have a file that is renamed-edited and commited.
git-diff-tree -M -p <commit> shows one result and git-diff-tree -M -p
<commit> <filename> shows another. If they both show a rename
occurred then I think the single file git-diff-tree will be more
useful.
Any strange idea I have is to make git-diff-tree traverse the list of
commits (assuming the list is returned from git-rev-list) to trace
renames of the file to its origin. Of course I don't know how useful
this is to most.
David
[davidho@penguin git-tutorial]$ git-diff-tree -r -M -p \
8c77fe87790276b4e0b2650d7c5799eb893ac3ed
8c77fe87790276b4e0b2650d7c5799eb893ac3ed
diff --git a/goodbye b/ciao
similarity index 83%
rename from goodbye
rename to ciao
index 0561cce..d8259f5 100644
--- a/goodbye
+++ b/ciao
@@ -4,3 +4,4 @@ Play, play, play
Work, work, work
Eat, eat, eat
Drink, drink, drink
+Chew, chew, chew
[davidho@penguin git-tutorial]$ git-diff-tree -r -M -p \
8c77fe87790276b4e0b2650d7c5799eb893ac3ed ciao
8c77fe87790276b4e0b2650d7c5799eb893ac3ed
diff --git a/ciao b/ciao
new file mode 100644
index 0000000..d8259f5
--- /dev/null
+++ b/ciao
@@ -0,0 +1,7 @@
+Hello World
+It's a new day for git
+Play, play, play
+Work, work, work
+Eat, eat, eat
+Drink, drink, drink
+Chew, chew, chew
next reply other threads:[~2005-10-18 19:56 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-10-18 19:56 David Ho [this message]
2005-10-18 20:50 ` git-diff-tree rename detection for single file Junio C Hamano
2005-10-19 2:45 ` Junio C Hamano
2005-10-19 3:12 ` Linus Torvalds
2005-10-19 5:20 ` Junio C Hamano
2005-10-19 16:04 ` Nicolas Pitre
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=4dd15d180510181256i1c5a82d9ld62acaedb493cf71@mail.gmail.com \
--to=davidkwho@gmail.com \
--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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox