diff options
Diffstat (limited to 'builtin/mv.c')
-rw-r--r-- | builtin/mv.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/builtin/mv.c b/builtin/mv.c index 4f324aea1d..e253550551 100644 --- a/builtin/mv.c +++ b/builtin/mv.c @@ -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)) - die(_("Unable to write new index file")); - } + if (active_cache_changed && + write_locked_index(&the_index, &lock_file, COMMIT_LOCK)) + die(_("Unable to write new index file")); return 0; } |