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

Re: limiting ref visibility to specific users

From
Shawn Pearce <spearce@spearce.org>
Date
Aug 17, 2010, 16:55 UTC
Message-ID
<AANLkTi=aSwu0JttExA8CN=2GhFYwt10+cCvUR77jibmj@mail.gmail.com>
In-Reply-To
<AANLkTikbT+e+7+LxrP6TkuuQ=8rMxuTnvFcUbUFzaUgk@mail.gmail.com>
On Tue, Aug 17, 2010 at 8:48 AM, Sverre Rabbelier <srabbelier@gmail.com> wrote:
Show 8 quoted lines
> On Tue, Aug 17, 2010 at 10:09, Enrico Weigelt <weigelt@metux.de> wrote:
>> I'd like to control which refs are visible to certain users
>> (when coming via ssh). Is there already some generic way to
>> do that (eg. passing some filter rule by a calling wrapper ?)
>
> Shawn, weren't you looking into something similar for Gerrit? Although
> I think what you were investigating would allow the user to get the
> rest of the refs somehow?

Yup. We implemented this in JGit by allowing the application to provide an implementation of a RefFilter interface, only the refs that the filter approves are shown to the remote client. During receive-pack (server side of push) the RefFilter also is used to restrict what objects the client may mention as a delta base, or as an object in the graph (e.g. commit parent, commit root tree, or tree entry member).

There is no equivalent in C Git. You have to use either Gerrit Code Review, or build your own server on top of JGit to take advantage of that feature.

-- 
Shawn.
Previous: Sverre Rabbelier
Message 3 of 3 in “limiting ref visibility to specific users”
  1. Enrico WeigeltAug 17, 2010
  2. Sverre RabbelierAug 17, 2010
  3. Shawn PearceAug 17, 2010

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.