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

Re: gitweb using "--cc"?

From
Linus Torvalds <torvalds@osdl.org>
Date
Feb 9, 2006, 20:27 UTC
Message-ID
<Pine.LNX.4.64.0602091216460.2458@g5.osdl.org>
In-Reply-To
<7v3bisb9qn.fsf@assigned-by-dhcp.cox.net>
On Thu, 9 Feb 2006, Junio C Hamano wrote:
>
> I was wondering if we could teach not diff_tree_combined_merge
> but show_combined_diff to do this, so that diff-files -c would
> benefit from the raw output as wel.
I wanted to do it that way, but it seemed less intrusive this way.
I agree that it is the correct thing to do, though.
Show 9 quoted lines
> That aside, one remaining nit with your patch is printing
> p->path.  diff.c::diff_flush_raw() does something like this:
> 
> 	if (line_termination) {
> 		path_one = quote_one(path_one);
> 		path_two = quote_one(path_two);
> 	}
> 	...
> 	printf("%s%c%s", status, inter_name_termination, path_one);
Good point.

I found another nitpick: file removal doesn't seem to generate a good diff in "git-diff-tree --cc" (but it's correct in the new "raw" format diff).

Here's a test-case, in case you care. Do "git-diff-tree --cc HEAD" in the merge-test directory.

Finally, I think it would be good to have a "--ignore-mode" flag that drops the mode info from the raw format (that repeating "100644" really isn't very interesting, and caring about mode changes is pretty rare).

		Linus

--- #!/bin/sh rm -rf merge-test mkdir merge-test cd merge-test/ git-init-db

echo "hello" > a echo "hi there" > b git add a b git commit -m "Initial commit of 'a' and 'b'" git branch other

echo "different hello" > a git commit -m "Changed 'a'" a

git checkout other echo "another different hello" > a git commit -m "Changed 'a' differently" a

git checkout master git merge "merge other" HEAD other >& /dev/null

echo "final hello" > a rm -f b echo "new file" > c git-update-index --add --remove a b c git commit -m "Evil merge"

Previous: Junio C HamanoNext: Linus Torvalds
Message 12 of 27 in “gitweb using "--cc"?”
  1. Linus TorvaldsFeb 8, 2006
  2. Junio C HamanoFeb 8, 2006
  3. Use describe to come up with the closest tag.Junio C Hamano, Feb 9, 2006
  4. Allow using --cc when showing a merge.Junio C Hamano, Feb 9, 2006
  5. Brian GerstFeb 9, 2006
  6. Linus TorvaldsFeb 9, 2006
  7. Junio C HamanoFeb 9, 2006
  8. Linus TorvaldsFeb 9, 2006
  9. Linus TorvaldsFeb 9, 2006
  10. Linus TorvaldsFeb 9, 2006
  11. Junio C HamanoFeb 9, 2006
  12. Linus TorvaldsFeb 9, 2006
  13. Linus TorvaldsFeb 9, 2006
  14. Junio C HamanoFeb 9, 2006
  15. Junio C HamanoFeb 9, 2006
  16. Junio C HamanoFeb 9, 2006
  17. Junio C HamanoFeb 9, 2006
  18. Junio C HamanoFeb 9, 2006
  19. Marco CostalbaFeb 11, 2006
  20. Junio C HamanoFeb 11, 2006
  21. Junio C HamanoFeb 11, 2006
  22. Junio C HamanoFeb 9, 2006
  23. Linus TorvaldsFeb 9, 2006
  24. Junio C HamanoFeb 9, 2006
  25. combine-diff: Record diff status a bit more faithfullyJunio C Hamano, Feb 10, 2006
  26. combine-diff: move formatting logic to show_combined_diff()Junio C Hamano, Feb 9, 2006
  27. Kay SieversFeb 9, 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.