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

[PATCH 0/2] negative hideRefs for overriding

From
Jeff King <peff@peff.net>
Date
Jul 28, 2015, 19:57 UTC
Message-ID
<20150728195747.GA13596@peff.net>

At GitHub, we keep some information in a private part of the refs namespace. We use transfer.hideRefs so that users do not see it when fetching or pushing, and that works well. However, sometimes we want to expose part of the hidden namespace (e.g., for an internal fetch or push), and that cannot be done with the existing code. Usually config variables are last-one-wins, so you can simply overwrite any existing values with "git -c ...". But for multi-valued config like hideRefs, that just appends to the list, and the ref remains hidden.

This series adds negation to hideRefs, which gives us a reasonable last-one-wins setup. That allows "git -c" to unhide a specific set of refs (though note you have to use "--upload-pack='git -c ...'" since upload-pack does not share our environment). It also allows more complex config, like hiding all of "refs/foo" except for "refs/foo/bar". We don't use that ourselves, but it might come in handy (and logically falls out of the last-one-wins setup).

The first patch is some documentation cleanup. The interesting bit is in the second one.

  [1/2]: docs/config.txt: reorder hideRefs config
  [2/2]: refs: support negative transfer.hideRefs
-Peff
Next: Jeff King
Message 1 of 7 in “negative hideRefs for overriding”
  1. 0/2 negative hideRefs for overridingJeff King, Jul 28, 2015
  2. 1/2 docs/config.txt: reorder hideRefs configJeff King, Jul 28, 2015
  3. 2/2 refs: support negative transfer.hideRefsJeff King, Jul 28, 2015
  4. Junio C HamanoJul 28, 2015
  5. Jeff KingJul 28, 2015
  6. Eric SunshineJul 30, 2015
  7. Jeff KingJul 30, 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.