{"thread":{"id":"37668","subject":"Feature request: Tracking info for remote branches","startedAt":"2014-10-03T14:32:32Z","lastAt":"2014-10-03T14:32:32Z","messageCount":1,"participants":["Stefan Monnier"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"250199","messageId":"jwvy4sxqm1a.fsf-monnier+gmane.comp.version-control.git@gnu.org","threadId":"37668","inReplyTo":null,"subject":"Feature request: Tracking info for remote branches","fromName":"Stefan Monnier","fromEmail":"monnier@iro.umontreal.ca","sentAt":"2014-10-03T14:32:32Z","receivedAt":"2014-10-03T14:32:32Z","isPatch":false,"sender":{"key":"monnier@iro.umontreal.ca","avatar":null},"body":"I really like the way Git officializes the relation between branches via\nthe notion of \"tracking\".  I can see which local branch tracks which\nremote branch easily, and that's very helpful.\n\nBut when I find a Git repository on the Web, I often have no idea about\nthe relationship between its branches, all I have instead is the\nbranches's names, which is often not sufficient.\n\nLet's take for example https://bitbucket.org/emiliolopez/linux.git.\nAmong its branches I see \"sunxi-codec\" and \"sunxi-codec-v0\".\n\nThe repository name gives me a hint that these are really\nbranches of the Linux kernel (rather than, say, branches of Emacs).\nAnd the branches's names gice me a hint that these are related to\nsupport for sunxi (aka Allwinner SoCs) and more specifically support\nfor codecs.  I know from out-of-band info that these are for audio\ncodecs.\n\nBut I don't know if these branches track linux-next, sunxi-devel, or\nsome other branch.  I can manually try to find out, by comparing the\ndistance to each one of those branches.  But:\n- it's costly.\n- it can only be done manually, because a script wouldn't know that\n  linux-next and sunxi-devel are better candidate branches than, say,\n  emacs-24.\n- as a consequence, front ends (bitbucket, cgit, gitweb, younameit)\n  can't show this information.\n\nSo, I'd like to suggest that Git be changed so that the branch tracking\ninformation is also maintained and made available for remote branches.\nE.g. when you push a branch, the info about which is the corresponding\ntarget branch (if any) be also pushed to the remote repository along\nwith the actual new commits.  Similarly, when cloning a remote\nrepository, that information should be copied locally so you can ask Git\nabout the relationship between those remote branches you just downloaded.\n\n\n        Stefan\n"}]}