Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Heidelberg <markus.heidelberg@web.de>2010-04-02 16:27:19 +0400
committerJunio C Hamano <gitster@pobox.com>2010-04-02 22:38:00 +0400
commit1f2362a944e09883cf1905e40b98554f488ed041 (patch)
tree3f42ff07893ca98a55bd9491f3148a948b9f95ef /builtin
parent73276235263485449a97be7c4d4e59eaf691c3ce (diff)
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')
-rw-r--r--builtin/commit.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/commit.c b/builtin/commit.c
index 8cc9293e26..c5ab683d5b 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) ||