Over in #git we ran into a user wondering why a particular remote said something about "master pushes to master" when the local branch mapped to that remote was not named master. Not having inspected the code, it certainly appears as if the "Local branch configured" and "Local ref configured" information is only accidentally correct, but since the normal configuration is the case in which it is accurate, no-one noticed the problem. In the test case below, in the "bar" case we are missing the "Local ref configured for 'git push'" section entirely. Strange since git push does indeed work. In the "baz" case we see the message and master does push to master. In the "biff" case we see the confluence of the two previous cases. The "foo" remote/subcase shows what we might expect, but the "baz" remote/subcase shows the 'Local ref configured' information is a lie. Finally, the "bar" remote/subcase shows that even the "Local branch configured" information is somehow magic based on the remote branch being named master. This test was done using git 1.7.3.1 Test case prep ---------------------------------------------------------------------- mkdir foo; cd foo; git init; echo A>A; git add A; git commit -m A; git checkout -b other; echo B>B; git add B; git commit -m B; git checkout master mkdir ../bar; cd ../bar; git init; git remote add foo ../foo; git fetch foo; git checkout --track -b foo_master foo/other mkdir ../baz; cd ../baz; git init; git remote add foo ../foo; git fetch foo; git checkout --track -b master foo/master mkdir ../biff; cd ../biff; git init; git remote add foo ../foo; git fetch foo; git checkout --track -b master foo/master; git remote add baz ../baz; git fetch baz; git checkout --track -b baz_master baz/master git remote add bar ../bar; git fetch bar; git checkout --track -b bar_master bar/master ---------------------------------------------------------------------- cd ../bar; git remote show foo -------------------------------------------------- * remote foo Fetch URL: ../foo Push URL: ../foo HEAD branch: master Remote branches: master tracked other tracked Local branch configured for 'git pull': foo_master merges with remote other -------------------------------------------------- cd ../baz; git remote show foo -------------------------------------------------- * remote foo Fetch URL: ../foo Push URL: ../foo HEAD branch: master Remote branches: master tracked other tracked Local branch configured for 'git pull': master merges with remote master Local ref configured for 'git push': master pushes to master (up to date) -------------------------------------------------- cd ../biff; git remote show foo; git remote show baz; git remote show bar -------------------------------------------------- * remote foo Fetch URL: ../foo Push URL: ../foo HEAD branch: master Remote branches: master tracked other tracked Local branch configured for 'git pull': master merges with remote master Local ref configured for 'git push': master pushes to master (up to date) * remote baz Fetch URL: ../baz Push URL: ../baz HEAD branch: master Remote branch: master tracked Local branch configured for 'git pull': baz_master merges with remote master Local ref configured for 'git push': master pushes to master (up to date) * remote bar Fetch URL: ../bar Push URL: ../bar HEAD branch: foo_master Remote branch: foo_master tracked -------------------------------------------------- -Seth Robertson -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html