git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v2] gitweb: Add an option for adding more branch refs

From
Krzesimir Nowak <krzesimir@endocode.com>
Date
Nov 28, 2013, 11:49 UTC
Message-ID
<1385639357.2075.3.camel@localhost.localdomain>
In-Reply-To
<xmqqob55sgww.fsf@gitster.dls.corp.google.com>
On Wed, 2013-11-27 at 12:55 -0800, Junio C Hamano wrote:
Show 16 quoted lines
> Eric Sunshine <sunshine@sunshineco.com> writes:
> 
> > 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).
> 
> "branches" are by definition what are in refs/heads/ hierarchy, so 
> 
>   Allow @additional_branch_refs configuration variable to tell
>   gitweb to show refs from additional hierarchies in addition to
>   branches in the list-of-branches view.
> 
> would be more appropriate and sufficient.
Thanks.
Show 17 quoted lines
> 
> >> 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?
> 
> True.

Ok, I'm deduping both heads and other refs as well. Now we send 500 only if the ref is simply invalid.

Show 7 quoted lines
> 
> I was primarily worried about metacharacters in the specified
> strings getting in the way of regexp matches the new code allows on
> them, but that has been resolved with the use of \Q..\E; if that
> automatic deduping is done, I do not immediately see any remaining
> issues in the latest round of the patch.
> 

New patch in "[PATCH v3] gitweb: Add an option for adding more branch refs". Thanks for reviews!

> Thanks.
-- 
Krzesimir Nowak
Software Developer
Endocode AG

krzesimir@endocode.com

------
Endocode AG, Johannisstraße 20, 10117 Berlin
info@endocode.com | www.endocode.com

Vorstandsvorsitzender: Mirko Boehm
Vorstände: Dr. Karl Beecher, Chris Kühl, Sebastian Sucker
Aufsichtsratsvorsitzende: Jennifer Beecher

Registergericht: Amtsgericht Charlottenburg - HRB 150748 B
Previous: Junio C Hamano
Message 5 of 5 in “gitweb: Add an option for adding more branch refs”
  1. gitweb: Add an option for adding more branch refsKrzesimir Nowak, Nov 27, 2013
  2. Eric SunshineNov 27, 2013
  3. Eric SunshineNov 27, 2013
  4. Junio C HamanoNov 27, 2013
  5. Krzesimir NowakNov 28, 2013

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.