From: Jakub Narebski <jnareb@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH (BUGFIX)] gitweb: Fix "Use of uninitialized value" error in 'history' view
Date: Sat, 5 Apr 2008 09:09:11 +0100 [thread overview]
Message-ID: <200804051009.13332.jnareb@gmail.com> (raw)
In-Reply-To: <7v63uwyc14.fsf@gitster.siamese.dyndns.org>
Junio C Hamano <gitster@pobox.com> wrote:
> Jakub Narebski <jnareb@gmail.com> writes:
>
> > When asked for history of a file with no $hash ('h') parameter set,
> > and which file is not present in current branch ("HEAD" or given by
> > $hash_hase ('hb') parameter), but is present deeper in the full
> > history of a branch, gitweb would spew multiple of "Use of
> > uninitialized value" warnings, and some links would be missing.
> > This commit fixes this bug.
>
> Thanks, does gitweb itself generate such a link?
>
> I can _artificially_ reproduce this, and I can also see that the patch
> would solve it, so I do not mind applying it, but I am curious how this
> was originally triggered.
Actually I came across this error when testing the "context-sensitive
feed links" patch, and was hand-crafting (munging) gitweb URLs.
But after thinking about this bug a bit I have realized that this
situation _can_ happen with link generated by gitweb, only in very rare
cases. It is enough if you use 'history' view link without $hash ('h')
parameter, and with transient $hash_base ('hb') parameter, i.e. either
name of branch, or "HEAD", or not set (implies "HEAD"), and happen into
situation where file was _deleted_ *between* gitweb link creation and
following (accessing) this link. For example 'history' links in 'tree'
and 'commitdiff' views doesn't have 'h' parameter. Also the 'history'
link in navigation bar wouldn't have 'h' parameter if 'blob' or 'tree'
view where it is in doesn't have it.
--
Jakub Narebski
Poland
next prev parent reply other threads:[~2008-04-05 8:10 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-04 14:23 [PATCH (BUGFIX)] gitweb: Fix "Use of uninitialized value" error in 'history' view Jakub Narebski
2008-04-05 7:51 ` Junio C Hamano
2008-04-05 8:09 ` Jakub Narebski [this message]
2008-04-05 16:43 ` Gerrit Pape
2008-04-05 17:16 ` Jakub Narebski
2008-04-05 17:38 ` Jakub Narebski
2008-04-05 20:13 ` [PATCH] Revert "gitweb: Add 'status_str' to parse_difftree_raw_line output" Jakub Narebski
2008-04-06 10:22 ` [PATCH (BUGFIX)] gitweb: Fix "Use of uninitialized value" error in 'history' view Gerrit Pape
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=200804051009.13332.jnareb@gmail.com \
--to=jnareb@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
/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).