Skip to content

Commit

Permalink
builtin/commit: remove unnecessary variable definition
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Markus Heidelberg authored and Junio C Hamano committed Apr 2, 2010
1 parent 7327623 commit 1f2362a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion builtin/commit.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) ||
Expand Down

0 comments on commit 1f2362a

Please sign in to comment.