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

Re: thoughts on a possible "pre-upload" hook

From
Adam Brewster <adambrewster@gmail.com>
Date
Sep 28, 2009, 02:01 UTC
Message-ID
<c376da900909271901q1667ecacw730ba5180a558f3b@mail.gmail.com>
In-Reply-To
<2e24e5b90909220320rbd5fd1l40c7898656445232@mail.gmail.com>
Show 6 quoted lines
> As git is used more and more in corporate-type environments, at some
> point it becomes convenient to have *branches* (or more accurately,
> refs) that are not readable.  The simplest way to do this (from git's
> point of view) is to allow a "pre-upload" hook, rather like the
> "pre-receive" hook or "update" hook.
>
What's the benefit of this over using multiple repositories?

For a simple case where you have public branches and private branches, you use public.git and private.git. A post-update hook in private.git can automatically push the appropriate branches to public.git (in which case they don't worry about public.git at all) or they can do it themselves.

For more complex access control, give each sub-unit that needs to share work a repository that's only readable by the members of that unit. Each developer works in his own repo. When something is ready for a wider audience, he pushes it to a team repo. When a team leader has something that's ready to move up, he pushes to a group repo, etc.

-- Adam

Previous: Sitaram ChamartyNext: Sitaram Chamarty
Message 8 of 9 in “thoughts on a possible "pre-upload" hook”
  1. Sitaram ChamartySep 22, 2009
  2. Randal L. SchwartzSep 22, 2009
  3. Matthieu MoySep 22, 2009
  4. Shawn O. PearceSep 22, 2009
  5. Sitaram ChamartySep 25, 2009
  6. Matthieu MoySep 25, 2009
  7. Sitaram ChamartySep 25, 2009
  8. Adam BrewsterSep 28, 2009
  9. Sitaram ChamartySep 28, 2009

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.