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
This commit is contained in:
@ -534,10 +534,9 @@ int cmd_add(int argc, const char **argv, const char *prefix)
|
||||
unplug_bulk_checkin();
|
||||
|
||||
finish:
|
||||
if (active_cache_changed) {
|
||||
if (write_locked_index(&the_index, &lock_file, COMMIT_LOCK))
|
||||
die(_("Unable to write new index file"));
|
||||
}
|
||||
if (write_locked_index(&the_index, &lock_file,
|
||||
COMMIT_LOCK | SKIP_IF_UNCHANGED))
|
||||
die(_("Unable to write new index file"));
|
||||
|
||||
UNLEAK(pathspec);
|
||||
UNLEAK(dir);
|
||||
|
Reference in New Issue
Block a user