git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Petr Baudis <pasky@suse.cz>
To: Yann Dirson <ydirson@altern.org>, jnareb@gmail.com
Cc: GIT list <git@vger.kernel.org>
Subject: Re: [BUG] gitweb on repo.or.cz shows buggy commitdiff
Date: Sat, 25 Aug 2007 22:25:30 +0200	[thread overview]
Message-ID: <20070825202530.GB1219@pasky.or.cz> (raw)
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:
> 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

  reply	other threads:[~2007-08-25 20:25 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-29  9:46 [BUG] gitweb on repo.or.cz shows buggy commitdiff Yann Dirson
2007-08-25 20:25 ` Petr Baudis [this message]
2007-08-27  0:30   ` Jakub Narebski
2007-08-27  0:48     ` Petr Baudis
2007-08-27  1:12       ` Jakub Narebski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070825202530.GB1219@pasky.or.cz \
    --to=pasky@suse.cz \
    --cc=git@vger.kernel.org \
    --cc=jnareb@gmail.com \
    --cc=ydirson@altern.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).