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

Unnamed branches

From
Petr Baudis <pasky@suse.cz>
Date
Jul 28, 2005, 19:19 UTC
Message-ID
<20050728191959.GB24948@pasky.ji.cz>
In-Reply-To
<200507282053.56786.Josef.Weidendorfer@gmx.de>

Dear diary, on Thu, Jul 28, 2005 at 08:53:56PM CEST, I got a letter where Josef Weidendorfer <Josef.Weidendorfer@gmx.de> told me that...

Show 11 quoted lines
> So why not put the name of the remote repository into the local branch name?
> A remote branch "host1:path#branch1" could be named "host1:path#branch1".
> The shorthand specified with "cg-add-branch" would be a local alias, i.e.
> 	(cd .git/refs/heads; ln -s host1:path#branch1 mylocalalias)
> 
> I even would find it handy to be able to say
> 	cg-pull host1:path#branch1
> , and
> 	cg-push mylocalbranch host2:path#branch2
> should create the alias "mylocalbranch"="host2:path#branch2"
> and create a entry in .git/branches.
  This is a sensible argument, and I initially disallowed this mainly to
save some work. ;-) But I agree that something like this would be nice.
The issues:
  * How to name the unnamed branches? You need some way to normalize
URLs like http://www.kernel.org/pub/s%63m//cogito/ to something which is
unique for a given location (http://www.kernel.org/pub/scm/cogito) and
usable as filename - at least substituting the slashes for something,
like underscores, and encoding underscored by % sequences.
  * Have all named remote branches as symlinks to their URLs (thus
effectively also eliminating the need for .git/branches/), or keep them
as they are? One disadvantage of the symlinks is that the refs/
directory would become quite messy.
-- 
				Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
If you want the holes in your knowledge showing up try teaching
someone.  -- Alan Cox
Previous: Josef WeidendorferNext: Junio C Hamano
Message 38 of 41 in “How is working on arbitrary remote heads supposed to work in Cogito (+ PATCH)?”
  1. Josef WeidendorferJul 27, 2005
  2. Junio C HamanoJul 28, 2005
  3. Petr BaudisJul 28, 2005
  4. Johannes SchindelinJul 28, 2005
  5. Petr BaudisJul 28, 2005
  6. Johannes SchindelinJul 28, 2005
  7. Petr BaudisJul 28, 2005
  8. Junio C HamanoJul 28, 2005
  9. Johannes SchindelinJul 28, 2005
  10. Ryan AndersonJul 28, 2005
  11. Johannes SchindelinJul 28, 2005
  12. Petr BaudisJul 28, 2005
  13. Johannes SchindelinJul 28, 2005
  14. Matthias UrlichsJul 28, 2005
  15. Johannes SchindelinJul 28, 2005
  16. Petr BaudisJul 29, 2005
  17. Junio C HamanoJul 29, 2005
  18. Petr BaudisJul 29, 2005
  19. Junio C HamanoJul 29, 2005
  20. Petr BaudisJul 29, 2005
  21. Junio C HamanoJul 29, 2005
  22. Petr BaudisJul 29, 2005
  23. Johannes SchindelinJul 29, 2005
  24. Petr BaudisJul 29, 2005
  25. Johannes SchindelinJul 29, 2005
  26. Petr BaudisJul 29, 2005
  27. Junio C HamanoJul 30, 2005
  28. Matthias UrlichsJul 29, 2005
  29. Junio C HamanoJul 30, 2005
  30. Carl BaldwinAug 13, 2005
  31. Junio C HamanoAug 13, 2005
  32. Carl BaldwinAug 15, 2005
  33. Johannes SchindelinAug 15, 2005
  34. Josef WeidendorferJul 29, 2005
  35. Matthias UrlichsJul 28, 2005
  36. Petr BaudisJul 29, 2005
  37. Josef WeidendorferJul 28, 2005
  38. Unnamed branchesPetr Baudis, Jul 28, 2005
  39. Junio C HamanoJul 28, 2005
  40. Petr BaudisJul 28, 2005
  41. Petr BaudisJul 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.