git summary: use more common way to cd to top level directory

This commit is contained in:
spacewander 2017-07-15 09:57:57 +08:00
parent 9e2a625b29
commit 227ef26e7f

View file

@ -1,9 +1,7 @@
#!/usr/bin/env bash
SUBDIRECTORY_OK=Yes
source "$(git --exec-path)/git-sh-setup"
cd_to_toplevel
cd "$(git root)" || { echo "Can't cd to top level directory";exit 1; }
commit=""
test $# -ne 0 && commit=$@