git-checkout: fix branch name output from the command
When switching branches with "git checkout", we internally did $arg^0 (aka $arg^{commit}) suffix but there was no need to. The improvement is easily visible in the change to an existing test t/3200-branch.sh in this commit; it was expecting rather ugly message. Signed-off-by: Junio C Hamano <junkio@cox.net>
Junio C Hamano committed
Jan 8, 2007 at 02:44 UTC
8d78b5af2376be533ed11b53b292bdf0f2e6173b
2 files changed
+2
-2
git-checkout.sh
+1
-1
@@ -53,7 +53,7 @@ while [ "$#" != "0" ]; do
53
exit 1
54
fi
55
new="$rev"
56
- new_name="$arg^0"
56
+ new_name="$arg"
57
if git-show-ref --verify --quiet -- "refs/heads/$arg"
58
then
59
branch="$arg"
t/t3200-branch.sh
+1
-1
@@ -48,7 +48,7 @@ test_expect_success \
48
test ! -f .git/logs/refs/heads/d/e/f'
49
50
cat >expect <<EOF
51
-0000000000000000000000000000000000000000 $HEAD $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> 1117150200 +0000 checkout: Created from master^0
51
+0000000000000000000000000000000000000000 $HEAD $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> 1117150200 +0000 checkout: Created from master
52
EOF
53
test_expect_success \
54
'git checkout -b g/h/i -l should create a branch and a log' \