提交 1f2362a9 编写于 作者: M Markus Heidelberg 提交者: Junio C Hamano

builtin/commit: remove unnecessary variable definition

The file descriptor is already defined at the beginning of the function.
Signed-off-by: NMarkus Heidelberg <markus.heidelberg@web.de>
Signed-off-by: NJunio C Hamano <gitster@pobox.com>
上级 73276235
......@@ -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) ||
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册