git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: git@vger.kernel.org
Subject: [PATCH 0/2] negative hideRefs for overriding
Date: Tue, 28 Jul 2015 15:57:47 -0400	[thread overview]
Message-ID: <20150728195747.GA13596@peff.net> (raw)

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

             reply	other threads:[~2015-07-28 19:57 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-28 19:57 Jeff King [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150728195747.GA13596@peff.net \
    --to=peff@peff.net \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).