diff --git a/git-sh-setup.sh b/git-sh-setup.sh
index 99cceeb858dcd2c83a040b0dd3117744e177e316..dcf9d0a31030ce4b6a7e7f2268ed8d25fdb57322 100755 (executable)
--- a/git-sh-setup.sh
+++ b/git-sh-setup.sh
eval "$GIT_EDITOR" '"$@"'
}
+sane_grep () {
+ GREP_OPTIONS= LC_ALL=C grep "$@"
+}
+
+sane_egrep () {
+ GREP_OPTIONS= LC_ALL=C egrep "$@"
+}
+
is_bare_repository () {
git rev-parse --is-bare-repository
}
}
require_work_tree () {
- test $(git rev-parse --is-inside-work-tree) = true ||
+ test "$(git rev-parse --is-inside-work-tree 2>/dev/null)" = true ||
die "fatal: $0 cannot be used without a working tree."
}