mv: combine two if(s)
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
b46b15dea0
commit
dcadc8b806
@ -274,10 +274,9 @@ int cmd_mv(int argc, const char **argv, const char *prefix)
|
|||||||
if (gitmodules_modified)
|
if (gitmodules_modified)
|
||||||
stage_updated_gitmodules();
|
stage_updated_gitmodules();
|
||||||
|
|
||||||
if (active_cache_changed) {
|
if (active_cache_changed &&
|
||||||
if (write_locked_index(&the_index, &lock_file, COMMIT_LOCK))
|
write_locked_index(&the_index, &lock_file, COMMIT_LOCK))
|
||||||
die(_("Unable to write new index file"));
|
die(_("Unable to write new index file"));
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user