git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFH] Finding all commits that touch the same files as a specific commit
@ 2008-07-12 15:58 Sverre Rabbelier
  2008-07-13  1:24 ` Junio C Hamano
  0 siblings, 1 reply; 7+ messages in thread
From: Sverre Rabbelier @ 2008-07-12 15:58 UTC (permalink / raw)
  To: Git Mailinglist

Heya,

Currently I do the following:
$git diff-tree --name-status --no-commit-id -r <hash>
To get all the files touched by the commit, I do:
$git rev-list HEAD -- all the returned paths here
This works perfectly, except when the subtree merge strategy is used,
since in that case I get (example from git.git):
$ git diff-tree --name-status --no-commit-id -r
5821988f97b827f6ba81dfeebff932067c88ba6c
M	git-gui.sh
M	lib/diff.tcl
$ git rev-list HEAD -- git-gui.sh lib/diff.tcl
$

Now it was noticed on #git that git log has a --follow argument which
-does- catch the rename, but it only works on one file at a time. So,
my question is this:
How do I find all commits that touch the same files as a specific commit?
I have described my current approach above, which does not work when
the subtree merge strategy is used. I am not stuck to this approach
though, if someone comes up with a better way to do this than with
'git diff-tree' / 'git rev-list' I'm fine by that. I provided with my
current approach in the hope that someone comes up with a similar
solution which means I'll have to edit less ;).

-- 
Cheers,

Sverre Rabbelier

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

end of thread, other threads:[~2008-07-14 14:31 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-12 15:58 [RFH] Finding all commits that touch the same files as a specific commit Sverre Rabbelier
2008-07-13  1:24 ` Junio C Hamano
2008-07-13 14:43   ` Sverre Rabbelier
2008-07-13 18:30     ` Johannes Schindelin
2008-07-14 11:17       ` Sverre Rabbelier
2008-07-14 12:13         ` Johannes Schindelin
2008-07-14 14:30           ` Sverre Rabbelier

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).