]> git.ipfire.org Git - thirdparty/git.git/blobdiff - rerere.c
Sync with 2.16.6
[thirdparty/git.git] / rerere.c
index 79203c6c1eae0db5515030b138e9e40e219af5f5..ea24d4c2f47ab6495d97f38245dd420a1ad38391 100644 (file)
--- a/rerere.c
+++ b/rerere.c
@@ -719,11 +719,9 @@ static void update_paths(struct string_list *update)
                        item->string);
        }
 
-       if (active_cache_changed) {
-               if (write_locked_index(&the_index, &index_lock, COMMIT_LOCK))
-                       die("Unable to write new index file");
-       } else
-               rollback_lock_file(&index_lock);
+       if (write_locked_index(&the_index, &index_lock,
+                              COMMIT_LOCK | SKIP_IF_UNCHANGED))
+               die("Unable to write new index file");
 }
 
 static void remove_variant(struct rerere_id *id)