summaryrefslogtreecommitdiff
path: root/show-index.c
diff options
context:
space:
mode:
authorRené Scharfe <l.s.r@web.de>2013-09-08 17:21:44 +0200
committerJunio C Hamano <gitster@pobox.com>2013-09-08 11:39:30 -0700
commitb07f7296080b20f5cc2069ce2761cacdd79b3432 (patch)
treebc65127d4958795f014f4319e2e6d034efd58477 /show-index.c
parentd521abf8900dc38f88ed8fbb007848fb2a812510 (diff)
downloadgit-b07f7296080b20f5cc2069ce2761cacdd79b3432.tar.gz
pull: use $curr_branch_short more
One of the first things git-pull.sh does is setting $curr_branch to the target of HEAD and $curr_branch_short to the same but with the leading "refs/heads/" removed. Simplify the code by using $curr_branch_short instead of setting $curr_branch to the same shortened value. The only other use of $curr_branch in that function doesn't have to be replaced with $curr_branch_short because it just checks if the string is empty. That property is the same with or without the prefix unless HEAD points to "refs/heads/" alone, which is invalid. Noticed-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Rene Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'show-index.c')
0 files changed, 0 insertions, 0 deletions