git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [usability bug] git branch -a does not disambiguate remote and local branches
@ 2008-12-15 18:15 Constantine Plotnikov
  2008-12-15 19:09 ` Johannes Schindelin
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Constantine Plotnikov @ 2008-12-15 18:15 UTC (permalink / raw)
  To: git

Let's consider the following scenario:

mkdir bare.git
mkdir local
cd bare.git
git --bare init
cd ../local
git init
echo test > test.txt
git add test.txt
git commit -m test
git remote add origin `pwd`/../bare.git
git push --all
git checkout -b origin/master master
echo updated > test.txt
git add test.txt
git commit -m updated

Note that that in this scenario, the user has created local branch in
the folder with the same name as a remote branch. While the supposed
user here is apparently shooting itself in the foot, the scenario is
still supported by git, and might happen as a result of more logical
git operations (like git fetch).

After this scenario is executed, git branch -a will give the following output:
  master
* origin/master
  origin/master

Note that there is two origin/master entries, but it is not clear
which is remote is and which is the local. I think that "git branch
-a" should print unambiguous names, qualifying them if needed.

Constantine

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2008-12-16  6:27 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-12-15 18:15 [usability bug] git branch -a does not disambiguate remote and local branches Constantine Plotnikov
2008-12-15 19:09 ` Johannes Schindelin
2008-12-15 19:15   ` Constantine Plotnikov
2008-12-15 19:21   ` Boyd Stephen Smith Jr.
2008-12-15 19:24 ` Lars Hjemli
2008-12-16  6:26 ` Björn Steinbrink

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).