diff options
author | Junio C Hamano <gitster@pobox.com> | 2018-03-21 19:30:10 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-03-21 19:30:10 +0100 |
commit | beb2cdf5041104a7513301a9b20944a617eec94e (patch) | |
tree | 6f44e7c048bc9857025235064b956a5d1d53ee25 /builtin/mv.c | |
parent | Merge branch 'ma/config-page-only-in-list-mode' (diff) | |
parent | write_locked_index(): add flag to avoid writing unchanged index (diff) | |
download | git-beb2cdf5041104a7513301a9b20944a617eec94e.tar.xz git-beb2cdf5041104a7513301a9b20944a617eec94e.zip |
Merge branch 'ma/skip-writing-unchanged-index'
Internal API clean-up to allow write_locked_index() optionally skip
writing the in-core index when it is not modified.
* ma/skip-writing-unchanged-index:
write_locked_index(): add flag to avoid writing unchanged index
Diffstat (limited to 'builtin/mv.c')
-rw-r--r-- | builtin/mv.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/builtin/mv.c b/builtin/mv.c index 8eceb310aa..6d141f7a53 100644 --- a/builtin/mv.c +++ b/builtin/mv.c @@ -293,8 +293,8 @@ int cmd_mv(int argc, const char **argv, const char *prefix) if (gitmodules_modified) stage_updated_gitmodules(&the_index); - if (active_cache_changed && - write_locked_index(&the_index, &lock_file, COMMIT_LOCK)) + if (write_locked_index(&the_index, &lock_file, + COMMIT_LOCK | SKIP_IF_UNCHANGED)) die(_("Unable to write new index file")); return 0; |