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

Re: [BUG] gitweb on repo.or.cz shows buggy commitdiff

From
Petr Baudis <pasky@suse.cz>
Date
Aug 25, 2007, 20:25 UTC
Message-ID
<20070825202530.GB1219@pasky.or.cz>
In-Reply-To
<20070729094645.GU23229@nan92-1-81-57-214-146.fbx.proxad.net>
On Sun, Jul 29, 2007 at 11:46:45AM CEST, Yann Dirson wrote:
Show 16 quoted lines
> Looking at [1] one can see that the diff, instead of showing the
> changes to the various .gitignore files touched by the commit,
> displays again and again the data/.gitignore one, but even confuses a
> Makefile modified by the commit for the .gitignore file to diff.
> 
> 
> |diff --git a/data/pics/.gitignore b/data/pics/.gitignore
> |index c5ec666af7db2d53e7ed86090c88f62ab8ec25a4..912bca74cbee222936f08e421230fd9dde903ecb 100644 (file)
> |--- a/lua/Makefile
> |+++ b/data/pics/.gitignore
> 
> Also, despite "+++ b/data/pics/.gitignore" being displayed in the diff
> header, it is indeed showing the diffs to "b/lua/Makefile".
> 
> 
> [1] http://repo.or.cz/w/tagua/ydirson.git?a=commitdiff;h=1f285b312fa526293164548d88e8403dfb354eb4

Looks funny. This is because the target object id of all the patches is the same as all the .gitignore files are identical, and this triggers "split patch detection" - I guess that triggers when diff thinks that a file was replaced, and injects full deletion and full creation diff inside. Due to this trigger, file diffs and raw diff records get out of sync and that results in Makefile diff misattribution.

Jakub, any idea how to fix this? Maybe to check if filename matches either from_file or to_file? But that would probably need a bit of code refactoring in git_patchset_body(), which is something I'm not really into. :-)

-- 
				Petr "Pasky" Baudis
Ever try. Ever fail. No matter. // Try again. Fail again. Fail better.
		-- Samuel Beckett
Previous: Yann DirsonNext: Jakub Narebski
Message 2 of 5 in “[BUG] gitweb on repo.or.cz shows buggy commitdiff”
  1. Yann DirsonJul 29, 2007
  2. Petr BaudisAug 25, 2007
  3. Jakub NarebskiAug 27, 2007
  4. Petr BaudisAug 27, 2007
  5. Jakub NarebskiAug 27, 2007

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.