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

Re: [PATCH/RFC] receive-pack: allow for hiding refs outside the namespace

From
Junio C Hamano <gitster@pobox.com>
Date
Oct 28, 2015, 15:48 UTC
Message-ID
<xmqq611rm1u0.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<20151028070045.5031.43810@s-8d3a2f8b.on.site.uni-stuttgart.de>
Lukas Fleischer <lfleischer@lfos.de> writes:
> Another patch I have in my patch queue adds support for a whitelist mode
> to hideRefs. There are several ways to implement that:
>
> 1. Make transfer.hideRefs='' hide all refs (it currently does not). The

Hmph, that even sounds like a bug. parse_hide_refs_config() does not seem to reject ref[] whose length is zero, and ref_is_hidden() would just check "starts_with(refname, match)" with an empty string as "match", so I would naively have expected that to work already.

Ahh, there is "if refname[len] is at the end or slash boundary" check after that. You're right--you'd need to tweak that one for it to work.

>    user can then whitelist refs explicitly using negative patterns
>    below that rule. This is how my current implementation works.
That sounds like a good way to go.
Thanks.
Previous: Jeff KingNext: Junio C Hamano
Message 14 of 17 in “receive-pack: allow for hiding refs outside the namespace”
  1. receive-pack: allow for hiding refs outside the namespaceLukas Fleischer, Oct 26, 2015
  2. Junio C HamanoOct 26, 2015
  3. Allow hideRefs to match refs outside the namespaceLukas Fleischer, Oct 28, 2015
  4. Junio C HamanoOct 28, 2015
  5. Lukas FleischerOct 31, 2015
  6. Junio C HamanoOct 31, 2015
  7. Lukas FleischerOct 31, 2015
  8. Lukas FleischerNov 1, 2015
  9. Junio C HamanoNov 1, 2015
  10. Lukas FleischerOct 27, 2015
  11. Junio C HamanoOct 27, 2015
  12. Lukas FleischerOct 28, 2015
  13. Jeff KingOct 28, 2015
  14. Junio C HamanoOct 28, 2015
  15. Junio C HamanoOct 30, 2015
  16. Jeff KingOct 30, 2015
  17. Lukas FleischerOct 31, 2015

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.