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

Re: [RFC] git-remote

From
SBSanti Béjar <sbejar@gmail.com>
Date
Jan 5, 2007, 12:59 UTC
Message-ID
<8aa486160701050459p4da586cdk2c2ddaabda5b4ca7@mail.gmail.com>
In-Reply-To
<7vfyarokk7.fsf@assigned-by-dhcp.cox.net>
+1. And much better than my RFC for "git clone --add".

Just some comments. I know it's in its early shape, tell me if you want this kind of comments later.

* I think it is more coherent to list the tracked branches first and
second the "branch merges".
* In "git remote add <name> <remote>": git could use the remote url to
deduce a <name>, like what git-clone does.
* If a branch does not have a branch.<name>.remote git-remote does not
default it to "origin" and sends an:

Use of uninitialized value in string ne at /home/santi/usr/stow/git/bin/git-remote line 222.

Maybe, in addition to this, git should require a branch.<name>.remote.
* With the config:
[remote "origin"]
        url = git://git2.kernel.org/pub/scm/git/git.git
        fetch = master:refs/remotes/origin/master
        fetch = next:refs/remotes/origin/next
        fetch = +refs/heads/pu:refs/remotes/origin/pu
        fetch = refs/heads/*:refs/remotes/origin/*
[branch "next"]
        merge=next
It outputs something as:
* remote origin
  URL: git://git2.kernel.org/pub/scm/git/git.git
  Tracked remote branches
    html maint man master next pu todo
  Tracked remote branches
    pu
* The first "Tracked ..." is for the wildcards and the second for the
explicit fetch. Maybe it should join the two or mark different as:
  Implicit tracked ...
  Tracked ...
* The next and master branches are missing because they are written
without the refs/heads/ prefix. And for this reason there is no:
Remote branch(es) merged with 'git pull' while on branch next
  next
(and the absence of branch.next.remote).
* In addition I would reformat this as:
Merges with 'git pull' while on branch:
  "next" merges "next"
  "topic" merges "master"
  ...
That's all for today :)
Santi
Previous: Shawn O. PearceNext: Johannes Schindelin
Message 6 of 16 in “[RFC] git-remote”
  1. Junio C HamanoJan 3, 2007
  2. Jakub NarebskiJan 3, 2007
  3. Shawn O. PearceJan 5, 2007
  4. Junio C HamanoJan 5, 2007
  5. Shawn O. PearceJan 5, 2007
  6. Santi BéjarJan 5, 2007
  7. Johannes SchindelinJan 5, 2007
  8. Santi BéjarJan 5, 2007
  9. Carl WorthJan 5, 2007
  10. Junio C HamanoJan 6, 2007
  11. Carl WorthJan 8, 2007
  12. J. Bruce FieldsJan 9, 2007
  13. Junio C HamanoJan 9, 2007
  14. Junio C HamanoJan 9, 2007
  15. Andreas EricssonJan 9, 2007
  16. J. Bruce FieldsJan 10, 2007

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.