Fix spurious compile error
[gitweb.git] / git-reset.sh
index b9045bc762471b462c3c99a5357b4b30421ea49f..bf2a0581fe0b0dd2c393dce6f31c8e9ad9f352c9 100755 (executable)
@@ -53,11 +53,7 @@ then
        exit
 fi
 
-TOP=$(git-rev-parse --show-cdup)
-if test ! -z "$TOP"
-then
-       cd "$TOP"
-fi
+cd_to_toplevel
 
 if test "$reset_type" = "--hard"
 then
@@ -91,7 +87,7 @@ update_ref_status=$?
 case "$reset_type" in
 --hard )
        test $update_ref_status = 0 && {
-               echo -n "HEAD is now at "
+               printf "HEAD is now at "
                GIT_PAGER= git log --max-count=1 --pretty=oneline \
                        --abbrev-commit HEAD
        }