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

Re: Finding file revisions

From
Linus Torvalds <torvalds@osdl.org>
Date
Apr 28, 2005, 21:32 UTC
Message-ID
<Pine.LNX.4.58.0504281428300.18901@ppc970.osdl.org>
In-Reply-To
<200504281658.39300.mason@suse.com>
On Thu, 28 Apr 2005, Chris Mason wrote:
Show 17 quoted lines
> On Thursday 28 April 2005 15:11, Kay Sievers wrote:
> >
> > Can you confirm this with the kernel tree?
> >   file-changes -c 9acf6597c533f3d5c991f730c6a1be296679018e drivers/usb/core/usb.c
> >
> > lists the commit:
> >   diff-tree -r 1d66c64c3cee10a465cd3f8bd9191bbeb718f650 c79bea07ec4d3ef087962699fe8b2f6dc5ca7754
> > f0534ee064901d0108eb7b2b1fcb59a98bb53c2b->c231b4bef314284a168fedb6c5f6c47aec5084fc drivers/usb/core/usb.c
> >
> >  cat-file commit c79bea07ec4d3ef087962699fe8b2f6dc5ca7754
> >
> > which seems not to have changed the file asked for.
> 
> Hmmm, that does work here:
> 
> coffee:/src/git # diff-tree -r 1d66c64c3cee10a465cd3f8bd9191bbeb718f650 c79bea07ec4d3ef087962699fe8b2f6dc5ca7754 | grep usb.core.usb.c
> *100644->100644 blob    f0534ee064901d0108eb7b2b1fcb59a98bb53c2b->c231b4bef314284a168fedb6c5f6c47aec5084fc      drivers/usb/core/usb.c

I think Key is confused by the fact that the commit is a -merge- commit, and the first parent has _not_ changed that file - it got changed through the merge.

Ie:
	cat-file commit c79bea07ec4d3ef087962699fe8b2f6dc5ca7754
gives
	tree 3fbdc4745cfde60df7d05815b343e4a253020530
	parent a9e4820c4c170b3df0d2185f7b4130b0b2daed2c
	parent 1d66c64c3cee10a465cd3f8bd9191bbeb718f650
	author Linus Torvalds <torvalds@ppc970.osdl.org.(none)> 1113921100 -0700
	committer Linus Torvalds <torvalds@ppc970.osdl.org.(none)> 1113921100 -0700
	Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/i2c-2.6.git/

and if you do a diff against the _first_ parent you don't see anything changing in USB..

		Linus
Previous: Chris MasonNext: Kay Sievers
Message 15 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.