summaryrefslogtreecommitdiff
path: root/builtin/update-index.c
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2016-05-08 09:47:32 (GMT)
committerJunio C Hamano <gitster@pobox.com>2016-05-09 19:29:08 (GMT)
commit23d05364fc5ba9fcc54cf5ae5503f3e987cec315 (patch)
treeba6eac78acbda6eab2dc8a5ad2606e1eef2eee37 /builtin/update-index.c
parent7dcf3d97fa6098382828551de8f91ad8b23d5a4c (diff)
downloadgit-23d05364fc5ba9fcc54cf5ae5503f3e987cec315.zip
git-23d05364fc5ba9fcc54cf5ae5503f3e987cec315.tar.gz
git-23d05364fc5ba9fcc54cf5ae5503f3e987cec315.tar.bz2
builtin/update-index.c: prefer "err" to "errno" in process_lstat_error
"errno" is already passed in as "err". Here we should use err instead of errno. errno is probably a copy/paste mistake in e011054 (Teach git-update-index about gitlinks - 2007-04-12) Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/update-index.c')
-rw-r--r--builtin/update-index.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/update-index.c b/builtin/update-index.c
index 1c94ca5..b8b8522 100644
--- a/builtin/update-index.c
+++ b/builtin/update-index.c
@@ -255,7 +255,7 @@ static int process_lstat_error(const char *path, int err)
{
if (err == ENOENT || err == ENOTDIR)
return remove_one_path(path);
- return error("lstat(\"%s\"): %s", path, strerror(errno));
+ return error("lstat(\"%s\"): %s", path, strerror(err));
}
static int add_one_path(const struct cache_entry *old, const char *path, int len, struct stat *st)