From: Eric Sunshine <sunshine@sunshineco.com>
To: Krzesimir Nowak <krzesimir@endocode.com>
Cc: Git List <git@vger.kernel.org>, Junio C Hamano <gitster@pobox.com>
Subject: Re: [PATCH v2] gitweb: Add an option for adding more branch refs
Date: Wed, 27 Nov 2013 15:38:11 -0500 [thread overview]
Message-ID: <CAPig+cR3hoWmDPJyWP6HbpuDvRwgdNj5VwX8A20DCfRBK5OuSQ@mail.gmail.com> (raw)
In-Reply-To: <CAPig+cT=P3ZC9j-WwQjr7gu6RrNgLrXsPkiVmdy5OGYfu8mPqA@mail.gmail.com>
On Wed, Nov 27, 2013 at 3:34 PM, Eric Sunshine <sunshine@sunshineco.com> wrote:
> On Wed, Nov 27, 2013 at 10:30 AM, Krzesimir Nowak
> <krzesimir@endocode.com> wrote:
>> Overriding an @additional_branch_refs configuration variable with
>> value ('wip') will make gitweb to show branches that appear in
>> refs/heads and refs/wip (refs/heads is hardcoded). Might be useful for
>> gerrit setups where user branches are not stored under refs/heads/.
>>
>> Signed-off-by: Krzesimir Nowak <krzesimir@endocode.com>
>> ---
>> diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
>> index 68c77f6..499281b 100755
>> --- a/gitweb/gitweb.perl
>> +++ b/gitweb/gitweb.perl
>> @@ -680,6 +688,19 @@ sub read_config_file {
>> return;
>> }
>>
>> +# performs sanity checks on parts of configuration.
>> +sub config_sanity_check {
>> + # check additional refs validity
>> + my %unique_branch_refs = ();
>> + for my $ref (@additional_branch_refs) {
>> + die_error(500, 'Invalid ref in @additional_branch_refs') unless (validate_ref($ref));
>
> Mentioning $ref in the error message would help the user resolve the
> problem more quickly.
>
>> + die_error(500, '"heads" specified in @additional_branch_refs') if ($ref eq 'heads');
>
> Rephrasing this as
>
> "heads" disallowed in @additional_branch_refs
>
> would better explain the problem to a user who has only made a cursory
> read of the documentation.
The program could easily filter out the redundant 'heads', so does
this really deserve a diagnostic?
next prev parent reply other threads:[~2013-11-27 20:38 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-27 15:30 [PATCH v2] gitweb: Add an option for adding more branch refs Krzesimir Nowak
2013-11-27 20:34 ` Eric Sunshine
2013-11-27 20:38 ` Eric Sunshine [this message]
2013-11-27 20:55 ` Junio C Hamano
2013-11-28 11:49 ` Krzesimir Nowak
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=CAPig+cR3hoWmDPJyWP6HbpuDvRwgdNj5VwX8A20DCfRBK5OuSQ@mail.gmail.com \
--to=sunshine@sunshineco.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=krzesimir@endocode.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).