]> git.ipfire.org Git - thirdparty/git.git/commit
Be more specific if upstream branch is not tracked
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Sat, 14 Apr 2012 07:54:34 +0000 (09:54 +0200)
committerJunio C Hamano <gitster@pobox.com>
Sun, 15 Apr 2012 21:25:34 +0000 (14:25 -0700)
commit17c82211ec2d29a6e7221948cba8dae9074dc5a6
tree91e2b82f58aed54df0dbff5e78c81e52495732d9
parentbb0dab5d617219d7efe8815cadef6d98c4bc3df8
Be more specific if upstream branch is not tracked

If the branch configured as upstream didn't have a local tracking
branch, git said "Upstream branch not found". We can be more helpful,
and separate the cases when upstream is not configured, and when it is
configured, but the upstream branch is not tracked in a local branch.

The following configuration leads to the second scenario:

    [remote "origin"]
         url = ...
            fetch = refs/heads/master
    [branch "master"]
            remote = origin
            merge = refs/heads/master

'git pull' will work on master, but master@{upstream} is not defined.

Signed-off-by: Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
sha1_name.c
t/t1507-rev-parse-upstream.sh