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

Re: [RFC/PATCH 1/2] remote tracking: return the tracking branch for the given branches

From
Jakub Narebski <jnareb@gmail.com>
Date
Jun 18, 2009, 14:17 UTC
Message-ID
<200906181617.07802.jnareb@gmail.com>
In-Reply-To
<adf1fd3d0906180655q5c142889r3375169b6cf1f8b0@mail.gmail.com>
On Thu, 18 June 2009, Santi Béjar wrote:
> 2009/6/18 Jakub Narebski <jnareb@gmail.com>:
[cut]
Show 10 quoted lines
> >
> >  $ git remote tracking <remote> <remote branch>
> >
> > would show all local branches that track <remote branch>, and have
> > <remote> as default remote,
> 
> Maybe my description is unclear, but it's not about local branches
> which track <branch> on <remote>, it is about the local branch
> representation of the remote branch, i.e. not 'master' but
> origin/master (git remote tracking origin master in a default clone).

Ah, the problem with the same (or similar) name for two different things. If we have local branch 'local' set to track branch 'master' on remote 'origin', we have:

   /------- local repository ------\            /- origin -\
  /                                 \          /            \
  |                                 |          |            |
  'local'  -------->  'origin/master' -----------> 'master' 
  refs/heads/local    refs/remotes/origin/master   refs/heads/master                
  branch.local.remote = origin
  branch.local.merge  = refs/heads/master
  remote.origin.fetch = +refs/heads/*:refs/remotes/origin/*

'origin/master' is called remote-TRACKING branch (for 'master' branch on remote 'origin'). Setting up automerge information for local branch 'local' which _follows_ branch 'master' on remote 'origin' is done using --TRACK option to git-branch.

Therefore the confusion.
Do I understand correctly that you want for
  $ git remote tracking origin master
to return
  origin/master
(and perhaps also origin/HEAD?).
-- 
Jakub Narebski
Poland
Previous: Santi BéjarNext: Santi Béjar
Message 9 of 19 in “Support for arbitrary mapping for "git pull --rebase"”
  1. 0/2 Support for arbitrary mapping for "git pull --rebase"Santi Béjar, Jun 18, 2009
  2. 1/2 remote tracking: return the tracking branch for the given branchesSanti Béjar, Jun 18, 2009
  3. Paolo BonziniJun 18, 2009
  4. Santi BéjarJun 18, 2009
  5. Johannes SchindelinJun 18, 2009
  6. Santi BéjarJun 18, 2009
  7. Jakub NarebskiJun 18, 2009
  8. Santi BéjarJun 18, 2009
  9. Jakub NarebskiJun 18, 2009
  10. Santi BéjarJun 18, 2009
  11. Santi BéjarJun 18, 2009
  12. Junio C HamanoJun 18, 2009
  13. Santi BéjarJun 18, 2009
  14. Santi BéjarJun 18, 2009
  15. 2/2 get_remote_merge_branch: Support for arbitrary mappingSanti Béjar, Jun 18, 2009
  16. Santi BéjarJun 18, 2009
  17. Johannes SchindelinJun 18, 2009
  18. Santi BéjarJun 18, 2009
  19. Santi BéjarJun 19, 2009

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.