X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=config.c;h=c47497001e172060abdcd08e4a606bec89303232;hb=1a82e79315ed633f6b0b1fc4076054950c5380d3;hp=2ae6153e5ee29ca88f52241d1ece79069d8c5875;hpb=f0679f474a884df13ce032d81dde34175c0fa343;p=git.git diff --git a/config.c b/config.c index 2ae6153e..c4749700 100644 --- a/config.c +++ b/config.c @@ -536,7 +536,7 @@ int git_config_set_multivar(const char* key, const char* value, * contents of .git/config will be written into it. */ fd = open(lock_file, O_WRONLY | O_CREAT | O_EXCL, 0666); - if (fd < 0) { + if (fd < 0 || adjust_shared_perm(lock_file)) { fprintf(stderr, "could not lock config file\n"); free(store.key); ret = -1;