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

Re: [PATCH 2/2] git-init: set receive.guardCurrentBranch = true for non-bare repositories

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Mar 24, 2008, 22:31 UTC
Message-ID
<alpine.LSU.1.00.0803242329550.4353@racer.site>
In-Reply-To
<alpine.LNX.1.00.0803241714520.19665@iabervon.org>
Hi,
On Mon, 24 Mar 2008, Daniel Barkalow wrote:
Show 27 quoted lines
> On Mon, 24 Mar 2008, Johannes Schindelin wrote:
> 
> > How about
> > 
> > 	receive.localBranches = (refuse | allow)
> > 
> > with a default "allow"?  Then we could add more rope later with the 
> > "update" option, which would run "git read-tree -u -m HEAD" if the 
> > current branch is updated, and simply allow all other branches being 
> > updated.
> 
> The use cases I've seen for pushing into a non-bare repository seem to 
> be cases in which "refs/heads/" isn't really local; it's only updated by 
> push from elsewhere, and it's named "refs/heads/" because that's where 
> public branches are served from. This suggests we could have:
> 
> 	core.noLocalBranches: true
> 
> with the implications:
> 
>  - it's definitely okay to push to refs/heads/
>  - HEAD is always detached.
> 
> That seems to me to accurately describe a repository used to hold 
> branches for public consumption and where there's a work tree for 
> testing and building, rather than development. (I.e., work tree 
> operations only read the repository.)

Funny. I thought bare repositories were meant for public consumption. And for testing, you still can have a (non-public) repository with a work-tree.

I'd rather not try to tell users that it is okay to mix the two.

Ciao, Dscho

Previous: Daniel BarkalowNext: Miklos Vajna
Message 8 of 11 in “Introduce receive.guardCurrentBranch”
  1. 1/2 Introduce receive.guardCurrentBranchJohannes Schindelin, Mar 23, 2008
  2. 2/2 git-init: set receive.guardCurrentBranch = true for non-bare repositoriesJohannes Schindelin, Mar 23, 2008
  3. Junio C HamanoMar 24, 2008
  4. Johannes SchindelinMar 24, 2008
  5. Junio C HamanoMar 24, 2008
  6. Johannes SchindelinMar 24, 2008
  7. Daniel BarkalowMar 24, 2008
  8. Johannes SchindelinMar 24, 2008
  9. Miklos VajnaMar 24, 2008
  10. Johannes SchindelinMar 24, 2008
  11. Miklos VajnaMar 24, 2008

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.