Disallow working directory commands in a bare repository.
[gitweb.git] / git-commit.sh
index 04aad5e5da6fad46bc71c859286615c2f6ce11ab..557b90355cdbaf108f0e339d61f7bf076cc7942d 100755 (executable)
@@ -6,6 +6,7 @@
 USAGE='[-a] [-s] [-v] [--no-verify] [-m <message> | -F <logfile> | (-C|-c) <commit>] [-u] [--amend] [-e] [--author <author>] [[-i | -o] <path>...]'
 SUBDIRECTORY_OK=Yes
 . git-sh-setup
+require_work_tree
 
 git-rev-parse --verify HEAD >/dev/null 2>&1 || initial_commit=t