From: Markus Heidelberg Date: Fri, 2 Apr 2010 12:27:19 +0000 (+0200) Subject: builtin/commit: remove unnecessary variable definition X-Git-Tag: v1.7.1-rc0~29 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=1f2362a944e09883cf1905e40b98554f488ed041;p=git.git builtin/commit: remove unnecessary variable definition The file descriptor is already defined at the beginning of the function. Signed-off-by: Markus Heidelberg Signed-off-by: Junio C Hamano --- diff --git a/builtin/commit.c b/builtin/commit.c index 8cc9293e2..c5ab683d5 100644 --- a/builtin/commit.c +++ b/builtin/commit.c @@ -307,7 +307,7 @@ static char *prepare_index(int argc, const char **argv, const char *prefix, int * (B) on failure, rollback the real index. */ if (all || (also && pathspec && *pathspec)) { - int fd = hold_locked_index(&index_lock, 1); + fd = hold_locked_index(&index_lock, 1); add_files_to_cache(also ? prefix : NULL, pathspec, 0); refresh_cache_or_die(refresh_flags); if (write_cache(fd, active_cache, active_nr) ||