On Thu, Apr 08, 2010 at 03:07:07PM +0800, Tay Ray Chuan wrote: > remote = remote_get(dest); > + if (!remote) > + usage(ls_remote_usage); I don't see an update to ls_remote_usage, but shouldn't it now be: git ls-remote [--heads] [--tags] [-u <exec> | --upload-pack <exec>] [repository] [<refs>...] or something now (while we're at it, maybe we can wrap it better as it's larger than 80 characters). But once that is done, shouldn't the (!remote) case say something like "you don't have a default remote". The user didn't invoke ls-remote incorrectly (as the usage message shows), but rather there was a configuration problem. > +test_expect_success 'use branch.<name>.remote if possible' ' > + > + # Remove "origin" so that we know that ls-remote is not using it. > + # > + # Ideally, we should test that branch.<name>.remote takes precedence > + # over "origin", but that is another matter altogether. > + # > + git remote rm origin && > + git config branch.master.remote self && > + git ls-remote >actual && > + test_cmp expected.all actual > + > +' Wouldn't your "ideally" just be: git clone . other-remote && git push other-remote HEAD:unique-ref && git config branch.master.remote other-remote && ... and check for "unique-ref" in the output? -Peff -- 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