Skip to content

Commit e88d022

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 066e596 commit e88d022

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
@@ -954,7 +954,7 @@ int git_config_set_multivar(const char* key, const char* value,
954954
lock = xcalloc(sizeof(struct lock_file), 1);
955955
fd = hold_lock_file_for_update(lock, config_filename, 0);
956956
if (fd < 0) {
957-
error("could not lock config file %s", config_filename);
957+
error("could not lock config file %s: %s", config_filename, strerror(errno));
958958
free(store.key);
959959
ret = -1;
960960
goto out_free;

0 commit comments

Comments
 (0)