aboutsummaryrefslogtreecommitdiff
path: root/builtin/commit.c
diff options
context:
space:
mode:
authorMarkus Heidelberg <markus.heidelberg@web.de>2010-04-02 14:27:19 +0200
committerJunio C Hamano <gitster@pobox.com>2010-04-02 11:38:00 -0700
commit1f2362a944e09883cf1905e40b98554f488ed041 (patch)
tree3f42ff07893ca98a55bd9491f3148a948b9f95ef /builtin/commit.c
parent73276235263485449a97be7c4d4e59eaf691c3ce (diff)
downloadgit-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>
Diffstat (limited to 'builtin/commit.c')
-rw-r--r--builtin/commit.c2
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) ||