mirror of
https://github.com/git/git
synced 2024-10-30 14:03:28 +00:00
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>
This commit is contained in:
parent
7327623526
commit
1f2362a944
1 changed files with 1 additions and 1 deletions
|
@ -307,7 +307,7 @@ static char *prepare_index(int argc, const char **argv, const char *prefix, int
|
||||||
* (B) on failure, rollback the real index.
|
* (B) on failure, rollback the real index.
|
||||||
*/
|
*/
|
||||||
if (all || (also && pathspec && *pathspec)) {
|
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);
|
add_files_to_cache(also ? prefix : NULL, pathspec, 0);
|
||||||
refresh_cache_or_die(refresh_flags);
|
refresh_cache_or_die(refresh_flags);
|
||||||
if (write_cache(fd, active_cache, active_nr) ||
|
if (write_cache(fd, active_cache, active_nr) ||
|
||||||
|
|
Loading…
Reference in a new issue