Git development
 help / color / mirror / Atom feed
* git-diff-tree rename detection for single file
@ 2005-10-18 19:56 David Ho
  2005-10-18 20:50 ` Junio C Hamano
  0 siblings, 1 reply; 6+ messages in thread
From: David Ho @ 2005-10-18 19:56 UTC (permalink / raw)
  To: git

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

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2005-10-19 16:07 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-10-18 19:56 git-diff-tree rename detection for single file David Ho
2005-10-18 20:50 ` 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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox