git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] negative hideRefs for overriding
@ 2015-07-28 19:57 Jeff King
  2015-07-28 19:59 ` [PATCH 1/2] docs/config.txt: reorder hideRefs config Jeff King
  2015-07-28 19:59 ` [PATCH 2/2] refs: support negative transfer.hideRefs Jeff King
  0 siblings, 2 replies; 7+ messages in thread
From: Jeff King @ 2015-07-28 19:57 UTC (permalink / raw)
  To: git

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2015-07-30 23:28 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-28 19:57 [PATCH 0/2] negative hideRefs for overriding Jeff King
2015-07-28 19:59 ` [PATCH 1/2] docs/config.txt: reorder hideRefs config Jeff King
2015-07-28 19:59 ` [PATCH 2/2] refs: support negative transfer.hideRefs Jeff King
2015-07-28 20:14   ` Junio C Hamano
2015-07-28 20:23     ` Jeff King
2015-07-30 20:17   ` Eric Sunshine
2015-07-30 23:28     ` Jeff King

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).