提交 e88d022a 编写于 作者: A Alex Riesen 提交者: Junio C Hamano

improve error message in config.c

Show errno if opening a lockfile fails.
Signed-off-by: NAlex Riesen <raa.lkml@gmail.com>
Signed-off-by: NJunio C Hamano <gitster@pobox.com>
上级 066e596a
......@@ -954,7 +954,7 @@ int git_config_set_multivar(const char* key, const char* value,
lock = xcalloc(sizeof(struct lock_file), 1);
fd = hold_lock_file_for_update(lock, config_filename, 0);
if (fd < 0) {
error("could not lock config file %s", config_filename);
error("could not lock config file %s: %s", config_filename, strerror(errno));
free(store.key);
ret = -1;
goto out_free;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册