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

Re: [PATCH] fetch/pull: support Cogito-style remote branch information.

From
Junio C Hamano <junkio@cox.net>
Date
Jul 15, 2005, 23:12 UTC
Message-ID
<7v64vbpsu4.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<Pine.LNX.4.58.0507151529590.19183@g5.osdl.org>
Linus Torvalds <torvalds@osdl.org> writes:
>  - I actually prefer code and documentation to be separated. ...
>    first the actual change, then the docs updates.
Understood.
Show 12 quoted lines
>  - I'd much rather have a generic "address rewriting layer" than a "-b" 
>    flag.
>
>    I don't mind the shorthand at all, but I don't think it should be that
>    special. It's not "worthy" of a flag - if you have a shorthand that 
>    says "linus == rsync://kernel.org/pub/scm/git/git.git", then I think it 
>    should just work, and 
>
> 	git pull linus
>
>    should end up not needing a "-b" flag. It's not like there is any 
>    real ambiguity.
That makes sense.  Naturally,
	git pull linus experimental
        git pull linus tag v2.6.13
should expand to:
       git pull rsync://kernel.org/pub/scm/git/git.git/ experimental
       git pull rsync://kernel.org/pub/scm/git/git.git/ tag v2.6.13

If a user is usually interested in e100 driver work, we should allow:

	echo rsync://kernel.org/pub/.../git/jgarzik/netdev-2.6.git#e100
	        >.git/branches/jgarzik-e100
and "git pull jgarzik-e100" should expand to:
	git pull rsync://kernel.org/pub/.../netdev-2.6.git/ e100
If the user says:
	git fetch jgarzik-e100 ieee80211-wifi

because the user wanted to peek his other branch just once, but did not want to bother creating another remote reference ("jgarzik-wifi", perhaps) for this one-time use. This should expand to:

	git fetch rsync://kernel.org/pub/.../netdev-2.6.git/ ieee80211-wifi
Show 10 quoted lines
> And it's not necessarily just the branch handling, but more of a generic
> shorthand: I'd love to be able to mix something like
>
> 	git pull jgarzik/misc-2.6 upstream
>
> and "jgarzik" would be expanded (through something like .git/branches) to 
> "master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/"), resulting in the 
> _full_ path being expanded to
>
> 	master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/misc-2.6 upstream

Nice, and sounds doable without too much ambiguities. This last one, however, needs to be coordinated with Pasky, if we want to use .git/branches/$name convention. I think Cogito would barf with your partial URL that ends with "...git/jgarzik/".

I'll code something up.
Previous: Linus TorvaldsNext: Junio C Hamano
Message 6 of 14 in “Documentation: packed GIT support commands.”
  1. Documentation: packed GIT support commands.Junio C Hamano, Jul 14, 2005
  2. Documentation: update tutorial to talk about push.Junio C Hamano, Jul 15, 2005
  3. Documentation: pull, push, packing repository and working with others.Junio C Hamano, Jul 15, 2005
  4. fetch/pull: support Cogito-style remote branch information.Junio C Hamano, Jul 15, 2005
  5. Linus TorvaldsJul 15, 2005
  6. Junio C HamanoJul 15, 2005
  7. fetch/pull: short-hand notation for remote repositories.Junio C Hamano, Jul 16, 2005
  8. fetch/pull: short-hand notation for remote repositories.Junio C Hamano, Jul 16, 2005
  9. Linus TorvaldsJul 16, 2005
  10. Junio C HamanoJul 16, 2005
  11. git-clone-script: store where we cloned from in .git/branches/originJunio C Hamano, Jul 18, 2005
  12. tutorial: mention "git clone" records .git/branches/originJunio C Hamano, Jul 18, 2005
  13. Documentation: describe short-hand used in fetch/pull.Junio C Hamano, Jul 16, 2005
  14. Documentation: adjust cvsimport command line.Junio C Hamano, Jul 16, 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.