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

Re: Finding file revisions

From
CMChris Mason <mason@suse.com>
Date
Apr 28, 2005, 11:45 UTC
Message-ID
<200504280745.05505.mason@suse.com>
In-Reply-To
<Pine.LNX.4.58.0504271506290.18901@ppc970.osdl.org>
On Wednesday 27 April 2005 18:19, Linus Torvalds wrote:
Show 14 quoted lines
> On Wed, 27 Apr 2005, Chris Mason wrote:
> > So, new prog attached.  New usage:
> >
> > file-changes [-c commit_id] [-s commit_id] file ...
> >
> > -c is the commit where you want to start searching
> > -s is the commit where you want to stop searching
>
> Your script will do some funky stuff, because you incorrectly think that
> the rev-list is sorted linearly. It's not. It's sorted in a rough
> chronological order, but you really can't do the "last" vs "cur" thing
> that you do, because two commits after each other in the rev-list listing
> may well be from two totally different branches, so when you compare one
> tree against the other, you're really doing something pretty nonsensical.

One more rev that should work as you suggested Here's the example output from a cogito changeset with merges. I print the diff-tree lines once for each matching parent and then print the commit once. It's very primitive, but hopefully some day someone will make a gui with happy clicky buttons for changesets and filerevs.

diff-tree -r 2544d7558f0ce94ab9c163f5b67244f71d8c85b8 69eeae031bf5447e99b9274761e2361e8c5a944e
618fdb616cebbd2fc9f1cddc0b6b75fd575250a1->3579b5fd1182679a39b83eaaa9dd0e7c970f4545 diff-tree.c
diff-tree -r 9831d8f86095edde393e495d7a55cab9d35d5d05 69eeae031bf5447e99b9274761e2361e8c5a944e
2d2913b6b98ac836b43755b1304d2a838dad87dd->4f01bbbbb3fd0e53e9ce968f167b6dae68fcfa92 Makefile
cat-file commit 69eeae031bf5447e99b9274761e2361e8c5a944e
    tree 7510dc1b63e9e690ec73952e40a31e43af4b55bc
    parent 2544d7558f0ce94ab9c163f5b67244f71d8c85b8
    parent 9831d8f86095edde393e495d7a55cab9d35d5d05
    author Petr Baudis <pasky@ucw.cz> 1114544917 +0200
    committer Petr Baudis <xpasky@machine.sinus.cz> 1114544917 +0200
    Merge with rsync://www.kernel.org/pub/linux/kernel/people/torvalds/git.git
-chris
Previous: Simon FowlerNext: Kay Sievers
Message 9 of 25 in “Finding file revisions”
  1. Chris MasonApr 27, 2005
  2. Linus TorvaldsApr 27, 2005
  3. Chris MasonApr 27, 2005
  4. Linus TorvaldsApr 27, 2005
  5. Chris MasonApr 27, 2005
  6. Simon FowlerApr 28, 2005
  7. Chris MasonApr 28, 2005
  8. Simon FowlerApr 28, 2005
  9. Chris MasonApr 28, 2005
  10. Kay SieversApr 28, 2005
  11. Tony LuckApr 28, 2005
  12. Thomas GlanzmannApr 28, 2005
  13. Kay SieversApr 28, 2005
  14. Chris MasonApr 28, 2005
  15. Linus TorvaldsApr 28, 2005
  16. Kay SieversApr 28, 2005
  17. Linus TorvaldsApr 28, 2005
  18. Chris MasonApr 28, 2005
  19. David WoodhouseApr 28, 2005
  20. David WoodhouseApr 28, 2005
  21. Thomas GleixnerApr 27, 2005
  22. Linus TorvaldsApr 28, 2005
  23. Thomas GleixnerApr 28, 2005
  24. Daniel BarkalowApr 28, 2005
  25. Chris MasonApr 28, 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.