git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Narebski <jnareb@gmail.com>
To: Junio C Hamano <junkio@cox.net>
Cc: git@vger.kernel.org, Martin Koegler <mkoegler@auto.tuwien.ac.at>
Subject: Re: [PATCH (resend)] gitweb: Fix bug in "blobdiff" view for split (e.g. file to symlink) patches
Date: Fri, 6 Apr 2007 00:58:23 +0200	[thread overview]
Message-ID: <200704060058.24524.jnareb@gmail.com> (raw)
In-Reply-To: <7v3b3epn0a.fsf@assigned-by-dhcp.cox.net>

DJunio C Hamano wrote:
> Jakub Narebski <jnareb@gmail.com> writes:
> 
>> git_patchset_body needs patch generated with --full-index option to
>> detect split patches,...
>> ...
>> This patch fixes this bug in git_blobdiff (in "blobdiff" view).
>>
>> Junio, you probably have missed this patch in the noise...
> 
> Probably.  Although I do remember seeing the patch, it was
> unclear why --full-index is needed (and it still is unclear to
> me).  Do you have a parser that expects/depends on full
> 40-hexdigit hash on the index line?
> 
> Not a complaint but a question -- I do not mind (actually prefer,
> probably) if gitweb worked on full 40-hexdigit internally to
> avoid possible ambiguity issues, although the output may need to
> be truncated to save people from having to see unneeded precision.

Yes, the parser (in git_patchset_body subroutine) checks for
presence of fully expanded 40-hexdigit hash, and compares it with
the fully expanded 40-hexdigit hash it has in $difftree hashref
(from the "raw" diff output, or "raw" part of diff output, or 
hand-crafted "raw" diff output). It is needed only for the 'html'
format case (for "commitdiff" / "blobdiff" view), for git_patchset_body
to know what values use for hyperlinking and replacements.

The output is truncated (and hyperlinked) in 'html' format case.


I could have relaxed the parser, and compare up to the precision
of hash in the "^index ..." line of extended git diff header in
"patch" diff output...

-- 
Jakub Narebski
Poland

      reply	other threads:[~2007-04-05 22:55 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-05 11:45 [PATCH (resend)] gitweb: Fix bug in "blobdiff" view for split (e.g. file to symlink) patches Jakub Narebski
2007-04-05 20:47 ` Junio C Hamano
2007-04-05 22:58   ` Jakub Narebski [this message]

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

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

  git send-email \
    --in-reply-to=200704060058.24524.jnareb@gmail.com \
    --to=jnareb@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=junkio@cox.net \
    --cc=mkoegler@auto.tuwien.ac.at \
    /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.
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 NNTP newsgroup(s).