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)
|
||||
stage_updated_gitmodules();
|
||||
|
||||
if (active_cache_changed) {
|
||||
if (write_locked_index(&the_index, &lock_file, COMMIT_LOCK))
|
||||
if (active_cache_changed &&
|
||||
write_locked_index(&the_index, &lock_file, COMMIT_LOCK))
|
||||
die(_("Unable to write new index file"));
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user