4141#define GRAPH_MIN_SIZE (GRAPH_HEADER_SIZE + 4 * GRAPH_CHUNKLOOKUP_WIDTH \
4242 + GRAPH_FANOUT_SIZE + the_hash_algo->rawsz)
4343
44+ /* Remember to update object flag allocation in object.h */
45+ #define REACHABLE (1u<<15)
46+
4447char * get_commit_graph_filename (const char * obj_dir )
4548{
4649 char * filename = xstrfmt ("%s/info/commit-graph" , obj_dir );
@@ -1030,11 +1033,11 @@ static void add_missing_parents(struct write_commit_graph_context *ctx, struct c
10301033{
10311034 struct commit_list * parent ;
10321035 for (parent = commit -> parents ; parent ; parent = parent -> next ) {
1033- if (!(parent -> item -> object .flags & UNINTERESTING )) {
1036+ if (!(parent -> item -> object .flags & REACHABLE )) {
10341037 ALLOC_GROW (ctx -> oids .list , ctx -> oids .nr + 1 , ctx -> oids .alloc );
10351038 oidcpy (& ctx -> oids .list [ctx -> oids .nr ], & (parent -> item -> object .oid ));
10361039 ctx -> oids .nr ++ ;
1037- parent -> item -> object .flags |= UNINTERESTING ;
1040+ parent -> item -> object .flags |= REACHABLE ;
10381041 }
10391042 }
10401043}
@@ -1052,7 +1055,7 @@ static void close_reachable(struct write_commit_graph_context *ctx)
10521055 display_progress (ctx -> progress , i + 1 );
10531056 commit = lookup_commit (ctx -> r , & ctx -> oids .list [i ]);
10541057 if (commit )
1055- commit -> object .flags |= UNINTERESTING ;
1058+ commit -> object .flags |= REACHABLE ;
10561059 }
10571060 stop_progress (& ctx -> progress );
10581061
@@ -1089,7 +1092,7 @@ static void close_reachable(struct write_commit_graph_context *ctx)
10891092 commit = lookup_commit (ctx -> r , & ctx -> oids .list [i ]);
10901093
10911094 if (commit )
1092- commit -> object .flags &= ~UNINTERESTING ;
1095+ commit -> object .flags &= ~REACHABLE ;
10931096 }
10941097 stop_progress (& ctx -> progress );
10951098}
0 commit comments