summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xgit-reset.sh7
1 files changed, 7 insertions, 0 deletions
diff --git a/git-reset.sh b/git-reset.sh
index c0feb44..03d2c3b 100755
--- a/git-reset.sh
+++ b/git-reset.sh
@@ -1,8 +1,15 @@
#!/bin/sh
USAGE='[--mixed | --soft | --hard] [<commit-ish>]'
+SUBDIRECTORY_OK=Yes
. git-sh-setup
+TOP=$(git-rev-parse --show-cdup)
+if test ! -z "$TOP"
+then
+ cd "$TOP"
+fi
+
update=
reset_type=--mixed
case "$1" in