@matheusbsbs / matheus-bagliano / commits / 1f2362a944
Fork 0

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>

Markus Heidelberg committed Apr 2, 2010 at 14:27 UTC 1f2362a944e09883cf1905e40b98554f488ed041
1 file changed +1 -1
builtin/commit.c
+1 -1
@@ -307,7 +307,7 @@ static char *prepare_index(int argc, const char **argv, const char *prefix, int
307 * (B) on failure, rollback the real index.
308 */
309 if (all || (also && pathspec && *pathspec)) {
310 - int fd = hold_locked_index(&index_lock, 1);
310 + fd = hold_locked_index(&index_lock, 1);
311 add_files_to_cache(also ? prefix : NULL, pathspec, 0);
312 refresh_cache_or_die(refresh_flags);
313 if (write_cache(fd, active_cache, active_nr) ||