From 227ef26e7f5ba786d0be43cab5f49e0cc68bf027 Mon Sep 17 00:00:00 2001 From: spacewander Date: Sat, 15 Jul 2017 09:57:57 +0800 Subject: [PATCH] git summary: use more common way to cd to top level directory --- bin/git-summary | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/bin/git-summary b/bin/git-summary index a8a7f40..bfeec6f 100755 --- a/bin/git-summary +++ b/bin/git-summary @@ -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=$@