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

Re: [RFC 2/2] Automatically transform .git/{branches,remotes} into .git/config

From
JWJosef Weidendorfer <josef.weidendorfer@gmx.de>
Date
Nov 21, 2005, 16:25 UTC
Message-ID
<200511211725.21642.Josef.Weidendorfer@gmx.de>
In-Reply-To
<Pine.LNX.4.63.0511211653420.2569@wbgn013.biozentrum.uni-wuerzburg.de>
On Monday 21 November 2005 16:57, Johannes Schindelin wrote:
Show 5 quoted lines
> > The part about .git/branches has to be sent to Pasky, not Junio. 
> 
> I was aware that .git/branches was introduced by Pasky, but as it is 
> handled in git-parse-remote.sh, I thought that it may be a bit more 
> general than just cogito.

AFAIK, Cogito introduced it, and Git used it in the wrong way. All files in .git/branches map 1:1 to a local head (perhaps not really existing). Git misused this information by using a head name as shortcut for a remote repository - which still leads to quite some confusion: In repositories cloned by Cogito you now have a "origin" head, and automatically have a repository shortcut "origin", too. The same name is used for different kinds of objects - IMHO quite bad.

The best thing is to simply remove .git/branches parsing in git at all.
 
> Anyways, I sent this out as an *RFC*, but the "C" obviously stands for 
> "Comments"...

I think that putting .git/remotes info into .git/config is nice. And I also think that putting .git/branches info into .git/config is a nice thing. If .git/branches/origin contains "http://www.kernel.org/pub/scm/git/git.git#todo", this should map to

[head.origin]
  fetchurl = http://www.kernel.org/pub/scm/git/git.git
  fetchhead = todo
The problem here is that heads can have spaces, "." and "/" in their name.
> What do people say? Is it useless to move that information into the 
> config, where it can be queried/replaced/set/removed by the config "API", 
> or should we continue with two incompatible ad-hoc formats? (If that 
> sounds biased, it was not meant to be.)

Cogito does not have per-repository configuration (e.g. like this "shortcut" thing), but only about per-head configuration. In this way, the information in .git/branches is quite different from the one in .git/remotes.

Josef
Show 10 quoted lines
> 
> Ciao,
> Dscho
> 
> -
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 
> 
Previous: Johannes SchindelinNext: Andreas Ericsson
Message 4 of 21 in “[RFC 2/2] Automatically transform .git/{branches,remotes} into .git/config”
  1. Johannes SchindelinNov 21, 2005
  2. Josef WeidendorferNov 21, 2005
  3. Johannes SchindelinNov 21, 2005
  4. Josef WeidendorferNov 21, 2005
  5. Andreas EricssonNov 21, 2005
  6. Junio C HamanoNov 21, 2005
  7. Petr BaudisNov 27, 2005
  8. Johannes SchindelinNov 28, 2005
  9. Junio C HamanoNov 28, 2005
  10. Andreas EricssonNov 28, 2005
  11. Junio C HamanoNov 28, 2005
  12. Josef WeidendorferNov 28, 2005
  13. Andreas EricssonNov 28, 2005
  14. Generic configuration plumbing (Was: Re: [RFC 2/2] Automatically transform...)Josef Weidendorfer, Nov 28, 2005
  15. Johannes SchindelinNov 28, 2005
  16. Petr BaudisNov 28, 2005
  17. Josef WeidendorferNov 28, 2005
  18. Junio C HamanoNov 29, 2005
  19. Johannes SchindelinNov 28, 2005
  20. Petr BaudisNov 28, 2005
  21. Johannes SchindelinNov 28, 2005

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.