]> git.ipfire.org Git - thirdparty/git.git/blobdiff - cache.h
split-index: don't compare cached data of entries already marked for split index
[thirdparty/git.git] / cache.h
diff --git a/cache.h b/cache.h
index 66d3b91cdb1d14bbe2499f90a0e1f6d9785b4b37..4d014541ab7bc7692919c871a5306543bbf361c5 100644 (file)
--- a/cache.h
+++ b/cache.h
@@ -917,15 +917,6 @@ enum log_refs_config {
 };
 extern enum log_refs_config log_all_ref_updates;
 
-enum branch_track {
-       BRANCH_TRACK_UNSPECIFIED = -1,
-       BRANCH_TRACK_NEVER = 0,
-       BRANCH_TRACK_REMOTE,
-       BRANCH_TRACK_ALWAYS,
-       BRANCH_TRACK_EXPLICIT,
-       BRANCH_TRACK_OVERRIDE
-};
-
 enum rebase_setup_type {
        AUTOREBASE_NEVER = 0,
        AUTOREBASE_LOCAL,
@@ -942,7 +933,6 @@ enum push_default_type {
        PUSH_DEFAULT_UNSPECIFIED
 };
 
-extern enum branch_track git_branch_track;
 extern enum rebase_setup_type autorebase;
 extern enum push_default_type push_default;
 
@@ -1033,6 +1023,16 @@ extern const struct object_id null_oid;
 
 static inline int hashcmp(const unsigned char *sha1, const unsigned char *sha2)
 {
+       /*
+        * This is a temporary optimization hack. By asserting the size here,
+        * we let the compiler know that it's always going to be 20, which lets
+        * it turn this fixed-size memcmp into a few inline instructions.
+        *
+        * This will need to be extended or ripped out when we learn about
+        * hashes of different sizes.
+        */
+       if (the_hash_algo->rawsz != 20)
+               BUG("hash size not yet supported by hashcmp");
        return memcmp(sha1, sha2, the_hash_algo->rawsz);
 }