Skip to content

Commit b7380fa

Browse files
committed
Merge branch 'gf/maint-sh-setup-nongit-ok' into maint-1.6.6
* gf/maint-sh-setup-nongit-ok: require_work_tree broken with NONGIT_OK
2 parents cb16bcc + ab62677 commit b7380fa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

git-sh-setup.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ cd_to_toplevel () {
137137
}
138138
139139
require_work_tree () {
140-
test $(git rev-parse --is-inside-work-tree) = true ||
140+
test "$(git rev-parse --is-inside-work-tree 2>/dev/null)" = true ||
141141
die "fatal: $0 cannot be used without a working tree."
142142
}
143143

0 commit comments

Comments
 (0)