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
Lukas Fleischer <lfleischer@lfos.de>
Date
Oct 27, 2015, 14:32 UTC
Message-ID
<20151027143207.18755.82151@s-8d3a2f8b.on.site.uni-stuttgart.de>
In-Reply-To
<20151027055911.4877.94179@typhoon.lan>
On Tue, 27 Oct 2015 at 06:59:11, Lukas Fleischer wrote:
Show 8 quoted lines
> [...]
> On second thought, it might be possible to overwrite the value of
> transfer.hiderefs using the -c command line option. If we combine that
> with the negative patterns supported by hiderefs, we might get a
> solution that is clean and that avoids race conditions. I will check
> whether that works with git-http-backend as well and will report back.
> 
> Thanks for the pointer!
Using receive.hideRefs seems to work but there are two minor issues:
1. There does not seem to be a way to pass configuration parameters to
   git-shell commands. Right now, the only way to work around this seems
   to write a wrapper script around git-shell that catches
   git-receive-pack commands and executes something like
   
       git -c receive.hideRefs=[...] receive-pack [...]
   
   instead of forwarding those commands to git-shell. How about allowing
   to overwrite configuration parameters via an environment variable?
   Has that been discussed before?
2. transfer.hideRefs and receive.hideRefs do not seem to work with Git
   namespaces in general. show_ref_cb() replaces each ref outside the
   current namespace with ".have" before passing it to show_ref() which
   in turn performs the ref_is_hidden() check. This has the nice side
   effect that receive.hideRefs=.have does exactly what I want, however
   it also means that hideRefs feature does not allow for excluding only
   specific tags outside the current namespace. Is that intended? Can we
   rely on Git always looking for ".have" in the hideRefs list in this
   case? Should the documentation be updated?

Regards, Lukas

Previous: Junio C HamanoNext: Junio C Hamano
Message 10 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.