author | Michael J Gruber <git@drmicha.warpmail.net> | |
Wed, 1 Apr 2009 21:42:49 +0000 (23:42 +0200) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Wed, 1 Apr 2009 22:48:30 +0000 (15:48 -0700) | ||
commit | 5e6e2b487e76066d03b4f5809dc6b44b1234519a | |
tree | 758dcd08a7eecbcc13aa4298b7e60329eefabc4a | tree | snapshot |
parent | 57dac0bfe43a68d55e16def58b8ed305e0676d3f | commit | diff |
Make local branches behave like remote branches when --tracked
This makes sure that local branches, when followed using --track, behave
the same as remote ones (e.g. differences being reported by git status
and git checkout). This fixes 1 known failure.
The fix is done within branch_get(): The first natural candidate,
namely remote_find_tracking(), does not have all the necessary info
because in general there is no remote struct for '.', and we don't want
one because it would show up in other places as well.
branch_get(), on the other hand, has access to merge_names[] (in
addition to merge[]) and therefore can set up the followed branch
easily.
Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This makes sure that local branches, when followed using --track, behave
the same as remote ones (e.g. differences being reported by git status
and git checkout). This fixes 1 known failure.
The fix is done within branch_get(): The first natural candidate,
namely remote_find_tracking(), does not have all the necessary info
because in general there is no remote struct for '.', and we don't want
one because it would show up in other places as well.
branch_get(), on the other hand, has access to merge_names[] (in
addition to merge[]) and therefore can set up the followed branch
easily.
Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
remote.c | diff | blob | history | |
t/t6040-tracking-info.sh | diff | blob | history |