Skip to content

Commit 6ffd567

Browse files
raalkmlgitster
authored andcommitted
improve error message in config.c
Show errno if opening a lockfile fails. Signed-off-by: Alex Riesen <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent d1c8c0c commit 6ffd567

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

config.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1001,7 +1001,7 @@ int git_config_set_multivar(const char* key, const char* value,
10011001
lock = xcalloc(sizeof(struct lock_file), 1);
10021002
fd = hold_lock_file_for_update(lock, config_filename, 0);
10031003
if (fd < 0) {
1004-
error("could not lock config file %s", config_filename);
1004+
error("could not lock config file %s: %s", config_filename, strerror(errno));
10051005
free(store.key);
10061006
ret = -1;
10071007
goto out_free;

0 commit comments

Comments
 (0)