diff options
author | Markus Heidelberg <markus.heidelberg@web.de> | 2010-04-02 14:27:19 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-04-02 11:38:00 -0700 |
commit | 1f2362a944e09883cf1905e40b98554f488ed041 (patch) | |
tree | 3f42ff07893ca98a55bd9491f3148a948b9f95ef | |
parent | 73276235263485449a97be7c4d4e59eaf691c3ce (diff) | |
download | git-1f2362a944e09883cf1905e40b98554f488ed041.tar.gz git-1f2362a944e09883cf1905e40b98554f488ed041.tar.xz |
builtin/commit: remove unnecessary variable definition
The file descriptor is already defined at the beginning of the function.
Signed-off-by: Markus Heidelberg <markus.heidelberg@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rw-r--r-- | builtin/commit.c | 2 |
1 files changed, 1 insertions, 1 deletions
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) || |