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

Re: path limiting broken

From
Linus Torvalds <torvalds@osdl.org>
Date
Apr 16, 2006, 17:58 UTC
Message-ID
<Pine.LNX.4.64.0604161052310.3701@g5.osdl.org>
In-Reply-To
<Pine.LNX.4.63.0604161931530.19020@wbgn013.biozentrum.uni-wuerzburg.de>
On Sun, 16 Apr 2006, Johannes Schindelin wrote:
Show 9 quoted lines
> 
> I finally found the commit which removed parse_whatchanged_opt() from 
> log-tree.c by
> 
> 	git-rev-list 4a617..next | while read commit; do \
> 		echo $commit; \
> 		git diff $commit^..$commit log-tree.c | \
> 			grep parse_whatchanged; \
> 	done | less

Heh. You really should learn about "-m -p", which does the above, but better (it compares against _all_ parents - you would have missed the thing _again_ if the "lt/logopt" branch had been the main branch ;)

> However, the combined diff of that commit does not show it, while the diff 
> to the first parent does:
> 
> 	git-show --cc 43f934aa90 | grep parse_whatchanged

Combined merges really only show conflicts where the different parents do something different from the end result. Since the whole file was taken from the lt/logopt branch, even

	git show -c 43f934aa90

won't show that "log-tree.c" file AT ALL, because there was no content conflict: the whole file was taken from one branch, unmodified.

If you want to see all changes against all parents, you really do need "-m -p" (or just "-m", which will show the raw diffs, and which will show how the file changes from one parent, but not the other).

Note that NORMALLY, you'd really never want to use "-m -p". It's a very very inconvenient format, since normally you want to see only the stuff that changed wrt the end result.

So "--cc" really does ignore everything that is irrelevant for the end result, and in this case you are very much trying to find somethign that is totally irrelevant for the end result, since the function you look for had never even _existed_ in the file as far as the end result goes..

		Linus
Previous: Johannes SchindelinNext: Johannes Schindelin
Message 7 of 13 in “path limiting broken”
  1. Johannes SchindelinApr 16, 2006
  2. Linus TorvaldsApr 16, 2006
  3. Johannes SchindelinApr 16, 2006
  4. Linus TorvaldsApr 16, 2006
  5. Johannes SchindelinApr 16, 2006
  6. Johannes SchindelinApr 16, 2006
  7. Linus TorvaldsApr 16, 2006
  8. Johannes SchindelinApr 16, 2006
  9. Linus TorvaldsApr 16, 2006
  10. Johannes SchindelinApr 16, 2006
  11. Linus TorvaldsApr 17, 2006
  12. Johannes SchindelinApr 16, 2006
  13. Linus TorvaldsApr 16, 2006

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.