git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Joe Ratterman <jratt0@gmail.com>
Cc: git@vger.kernel.org, jnareb@gmail.com
Subject: Re: [PATCH] Gitweb: Avoid warnings when a repo does not have a valid HEAD
Date: Thu, 15 Dec 2011 14:28:19 -0800	[thread overview]
Message-ID: <7vty51lbb0.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <7v62hhmr2s.fsf@alter.siamese.dyndns.org> (Junio C. Hamano's message of "Thu, 15 Dec 2011 14:02:19 -0800")

Junio C Hamano <gitster@pobox.com> writes:

> Joe Ratterman <jratt0@gmail.com> writes:
>
>> It is possible that the HEAD reference does not point to an existing
>> branch.  When viewing such a repository in gitweb, a message like this
>> one was sent to the error log:
>>
>>   gitweb.cgi: Use of uninitialized value in string eq at /usr/src/git/gitweb/gitweb.cgi line 5115.
>>
> ..., but in that case a repository with
> a HEAD that points at an unborn branch _and_ have other refs that do point
> at existing commit is already screwed-up, so if we want to be extremely
> pedantic then perhaps ...
>
>     my $curr = ((defined $head && exists $ref{"id"} && defined $ref{"id"})
> 		? ($ref{"id"} eq $head)
>                 : 0);

Just in case, I was not suggesting to update the patch to look like the
above by "if we want to be extremely pedantic".

After all, that error message in the log may be a good thing that notifies
the site administrators about a suspicious repository so that it can be
fixed (even though it was not a designed "feature" but something that
happens to work).

  reply	other threads:[~2011-12-15 22:28 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-15 20:58 [PATCH] Gitweb: Avoid warnings when a repo does not have a valid HEAD Joe Ratterman
2011-12-15 22:02 ` Junio C Hamano
2011-12-15 22:28   ` Junio C Hamano [this message]
2011-12-16 14:55     ` Jakub Narebski
  -- strict thread matches above, loose matches on Subject: below --
2011-12-13 22:35 Joe Ratterman
2011-12-14  8:53 ` Jonathan Nieder

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=7vty51lbb0.fsf@alter.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=jnareb@gmail.com \
    --cc=jratt0@gmail.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).