resolve-undo: be specific what part of the index has changed
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>
Fri, 13 Jun 2014 12:19:29 +0000 (19:19 +0700)
committerJunio C Hamano <gitster@pobox.com>
Fri, 13 Jun 2014 18:49:38 +0000 (11:49 -0700)
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
cache.h
resolve-undo.c
diff --git a/cache.h b/cache.h
index 31d4541bc682a9fcfa237dcff9a2ac90db3d7b19..976f2e0c33e53f063bf84208acd4ff9678a77d0a 100644 (file)
--- a/cache.h
+++ b/cache.h
@@ -272,6 +272,7 @@ static inline unsigned int canon_mode(unsigned int mode)
 #define CE_ENTRY_CHANGED       (1 << 1)
 #define CE_ENTRY_REMOVED       (1 << 2)
 #define CE_ENTRY_ADDED         (1 << 3)
+#define RESOLVE_UNDO_CHANGED   (1 << 4)
 
 struct index_state {
        struct cache_entry **cache;
index e9dff57824577c09e5b6edbfe429bcbb1e7d3421..468a2eb92c6d72c519faf5c8203d3d41d520c12d 100644 (file)
@@ -110,7 +110,7 @@ void resolve_undo_clear_index(struct index_state *istate)
        string_list_clear(resolve_undo, 1);
        free(resolve_undo);
        istate->resolve_undo = NULL;
-       istate->cache_changed = SOMETHING_CHANGED;
+       istate->cache_changed |= RESOLVE_UNDO_CHANGED;
 }
 
 int unmerge_index_entry_at(struct index_state *istate, int pos)