Andrew's git
/
gitweb.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
commit
grep
author
committer
pickaxe
?
re
Teach run-command to redirect stdout to /dev/null
[gitweb.git]
/
git-sh-setup.sh
diff --git
a/git-sh-setup.sh
b/git-sh-setup.sh
index b4aa4b2f4e6b53388ea9ec0ac13316ae0d0d4458..f24c7f2d23c13e9874308a019f3c0f93225de3c0 100755
(executable)
--- a/
git-sh-setup.sh
+++ b/
git-sh-setup.sh
@@
-48,7
+48,8
@@
cd_to_toplevel () {
}
require_work_tree () {
- test $(is_bare_repository) = false ||
+ test $(is_bare_repository) = false &&
+ test $(git-rev-parse --is-inside-git-dir) = false ||
die "fatal: $0 cannot be used without a working tree."
}