Andrew's git
/
gitweb.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
commit
grep
author
committer
pickaxe
?
re
Merge branch 'mp/upload-pack-use-embedded-args' into maint
[gitweb.git]
/
builtin
/
config.c
diff --git
a/builtin/config.c
b/builtin/config.c
index 8602b216d876e5f68c725bd004350d8bdfe819a5..ca9f834ae648177a67e1c9fea9481dfe58ff3972 100644
(file)
--- a/
builtin/config.c
+++ b/
builtin/config.c
@@
-377,6
+377,9
@@
static int get_colorbool(const char *var, int print)
static void check_write(void)
{
+ if (!given_config_source.file && !startup_info->have_repository)
+ die("not in a git directory");
+
if (given_config_source.use_stdin)
die("writing to stdin is not supported");