fetch: opportunistically update tracking refs
[gitweb.git] / cache.h
diff --git a/cache.h b/cache.h
index 94ca1acf704bd2dfdc561b6b2d3d64740b975f61..9670d99f2bdef5d1570ae6b808b40c66e873e656 100644 (file)
--- a/cache.h
+++ b/cache.h
@@ -1024,9 +1024,21 @@ struct ref {
        unsigned int
                force:1,
                forced_update:1,
-               merge:1,
                deletion:1,
                matched:1;
+
+       /*
+        * Order is important here, as we write to FETCH_HEAD
+        * in numeric order. And the default NOT_FOR_MERGE
+        * should be 0, so that xcalloc'd structures get it
+        * by default.
+        */
+       enum {
+               FETCH_HEAD_MERGE = -1,
+               FETCH_HEAD_NOT_FOR_MERGE = 0,
+               FETCH_HEAD_IGNORE = 1
+       } fetch_head_status;
+
        enum {
                REF_STATUS_NONE = 0,
                REF_STATUS_OK,