From: Luke Dashjr Date: Thu, 13 Aug 2009 03:20:24 GMT Subject: [PATCH 5/5] Convert add_file_to_index's lstat failure from a die to an error Message-ID: <1250133624-2272-5-git-send-email-luke-jr+git@utopios.org> In-Reply-To: <1250133624-2272-4-git-send-email-luke-jr+git@utopios.org> In order to make --ignore-errors able to ignore a lstat failure in add_file_to_index, it needs to raise an error, NOT a fatal die. Signed-off-by: Luke Dashjr --- read-cache.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/read-cache.c b/read-cache.c index 4e3e272..074e6b8 100644 --- a/read-cache.c +++ b/read-cache.c @@ -638,7 +638,7 @@ int add_file_to_index(struct index_state *istate, const char *path, int flags) { struct stat st; if (lstat(path, &st)) - die_errno("unable to stat '%s'", path); + return error_errno("unable to stat '%s'", path); return add_to_index(istate, path, &st, flags); } -- 1.6.3.3