Merge branch 'nd/pack-struct-commit'
authorJunio C Hamano <gitster@pobox.com>
Wed, 30 May 2018 05:04:08 +0000 (14:04 +0900)
committerJunio C Hamano <gitster@pobox.com>
Wed, 30 May 2018 05:04:08 +0000 (14:04 +0900)
Memory optimization.

* nd/pack-struct-commit:
commit.h: rearrange 'index' to shrink struct commit

1  2 
commit.h
diff --cc commit.h
index 10e34e1a18b726b0168a9fe2e4937a23d6cefd11,fd1cbe72634a66b683bdd543a6cdd5c74eb1fe07..c3af512f8b1b90b3963d0921f7ec0d0a43a2fcbe
+++ b/commit.h
@@@ -19,17 -19,11 +19,17 @@@ struct commit_list 
  struct commit {
        struct object object;
        void *util;
-       unsigned int index;
        timestamp_t date;
        struct commit_list *parents;
 -      struct tree *tree;
 +
 +      /*
 +       * If the commit is loaded from the commit-graph file, then this
 +       * member may be NULL. Only access it through get_commit_tree()
 +       * or get_commit_tree_oid().
 +       */
 +      struct tree *maybe_tree;
        uint32_t graph_pos;
+       unsigned int index;
  };
  
  extern int save_commit_buffer;