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

Re: Current Issues #3

From
Jakub Narebski <jnareb@gmail.com>
Date
May 23, 2006, 21:58 UTC
Message-ID
<e500hd$vpr$1@sea.gmane.org>
In-Reply-To
<Pine.LNX.4.64.0605220216310.3697@g5.osdl.org>
Linus Torvalds wrote:
[...]
Show 11 quoted lines
> But with the above, you can fairly naturally do:
> 
>  - "git pull" 
> 
>       No arguments. fetch the remote described by the current branch, 
>       and merge into current branch (we might decide to fetch all the 
>       remotes associated with that repo, just because once we do this, 
>       we might as well, but that's not that important to the end 
>       result).
> 
>  - "git pull <repo>"
     (i.e. re-clone)
Show 17 quoted lines
>       fetch all remotes that use <repo>. IFF the current branch is 
>       matched to one of those remotes, merge the changes into the 
>       current branch. But if you happened to be on another unrelated 
>       branch, nothing happens aside from the fetch.
> 
>  - "git pull <remote>"
> 
>       fetch just the named remote. IFF that remote is also the remote 
>       for the current branch, do merge it into current. Again, we 
>       _might_ decide to just do the whole repo.
> 
>  - "git pull <repo> <branchname>"
> 
>       fetch the named branch from the named repository and merge it into 
>       current (no ifs, buts or maybes - now we've basically overridden 
>       the default relationships, so now the <repo> is just a pure 
>       shorthand for the location of the repository)

Fetch into curret branch, or specified by branch configuration, then current if unspecified?

Show 6 quoted lines
>  - "git pull <repo> <src>:<dst>"
> 
>       same as now. fetch <repo> <src> into <dst>, and merge it into the 
>       current branch (again, we've overridden any default relationships).
> 
> but maybe this is overdesigned. Comments?

It all means that within <repo> annd <remote> names should be unique (to know if we use "git pull <repo>" or "git pull <remote>").

Perhaps it would be nice to have
 - "git pull <repo> *:<dst>"
 - "git pull <repo> <src>:*"
 - "git pull <repo> *:*"
and
 - "git pull <repo> <src>:<dst>:<to-merge>"

as easier to remember options. Of course what is the remote branch related to <dst>, and what is local branch related to <src> would be in branch/remotes/repos configuration.

BTW. what about --use-separate-remotes option support?
-- 
Jakub Narebski
Warsaw, Poland
Previous: SeanNext: Martin Waitz
Message 4 of 8 in “Current Issues #3”
  1. Junio C HamanoMay 22, 2006
  2. Linus TorvaldsMay 22, 2006
  3. SeanMay 22, 2006
  4. Jakub NarebskiMay 23, 2006
  5. Martin WaitzMay 22, 2006
  6. Daniel BarkalowMay 22, 2006
  7. Carl WorthMay 22, 2006
  8. Shawn PearceMay 22, 2006

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.