summaryrefslogtreecommitdiff
path: root/git-checkout.sh
diff options
context:
space:
mode:
Diffstat (limited to 'git-checkout.sh')
-rwxr-xr-xgit-checkout.sh1
1 files changed, 1 insertions, 0 deletions
diff --git a/git-checkout.sh b/git-checkout.sh
index 8f4356d..a2b8e4f 100755
--- a/git-checkout.sh
+++ b/git-checkout.sh
@@ -3,6 +3,7 @@
USAGE='[-f] [-b <new_branch>] [-m] [<branch>] [<paths>...]'
SUBDIRECTORY_OK=Sometimes
. git-sh-setup
+require_work_tree
old_name=HEAD
old=$(git-rev-parse --verify $old_name 2>/dev/null)