git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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/

Previous: Linus TorvaldsNext: Frank Sorenson
Message 9 of 24 in “How do I...”
  1. Frank SorensonMay 6, 2005
  2. Thomas GlanzmannMay 6, 2005
  3. Thomas GlanzmannMay 6, 2005
  4. Dave KleikampMay 6, 2005
  5. Frank SorensonMay 6, 2005
  6. Dave KleikampMay 6, 2005
  7. Frank SorensonMay 6, 2005
  8. Linus TorvaldsMay 6, 2005
  9. Junio C HamanoMay 6, 2005
  10. Frank SorensonMay 6, 2005
  11. Daniel BarkalowMay 6, 2005
  12. Frank SorensonMay 6, 2005
  13. Linus TorvaldsMay 6, 2005
  14. David WoodhouseMay 6, 2005
  15. Linus TorvaldsMay 6, 2005
  16. David WoodhouseMay 6, 2005
  17. Linus TorvaldsMay 6, 2005
  18. David WoodhouseMay 6, 2005
  19. Linus TorvaldsMay 6, 2005
  20. David WoodhouseMay 7, 2005
  21. Thomas KolejkaMay 6, 2005
  22. David WoodhouseMay 6, 2005
  23. Benjamin HerrenschmidtMay 7, 2005
  24. Linus TorvaldsMay 6, 2005

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.