Re: How do I...
- From
Junio C Hamano <junkio@cox.net>
- Date
- May 6, 2005, 16:35 UTC
- Message-ID
- <7vsm10cnx3.fsf@assigned-by-dhcp.cox.net>
- In-Reply-To
- <Pine.LNX.4.58.0505060905090.2233@ppc970.osdl.org>
>>>>> "LT" == Linus Torvalds <torvalds@osdl.org> writes:
LT> On Fri, 6 May 2005, Frank Sorenson wrote:
Show 10 quoted lines
>> >> Okay, I've got some "How can I?" questions. I hope I'm not the only one >> still working to "git it". >> >> How can I git a list of commits that have modified a particular file? >> For example, I'd like to do something like this: >> # git-file-revs Makefile >> f7eb55878f11575281add2a5726e483aed5e45bb >> aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa >> bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
LT> Guys - whoever wrote one of the scripts, can you please send out your LT> current version to the git list and cc me, and explain why yours is LT> superior to the other peoples version. Please?
I think I mentioned and posted an interactive version called jit-trackdown. It is part of JIT found at [*1*]. You may have an older version that does not have the command.
LT> But I might cook something up myself too.
Yourself or not, I think it is a good idea to do something that does exactly Frank wants, namely, just list commits. Even better would be, to take commits with multiple parents into account, list of <commit> <parent> pairs, like:
$ git-file-revs Makefile
f7eb55....... aaaaaa.......
f7eb55....... bbbbbb.......
aaaaaa....... dddddd.......which shows commit f7eb55... changed it relative to both of its parents aaaaaa... and bbbbbb...
[Footnotes] *1* http://members.cox.net/junkio/