X-Git-Url: http://git.ipfire.org/?a=blobdiff_plain;f=commit-graph.h;h=390c7f696104fbe772151b91cb04889d0f682401;hb=9103a75c584dd6edddfcb3004974a1bb48d9214c;hp=7dfb8c896fc35f633c73221ec639ca9c425338ab;hpb=fa03d9c6990aa0f0ca675e89bde1861988d0c517;p=thirdparty%2Fgit.git diff --git a/commit-graph.h b/commit-graph.h index 7dfb8c896f..390c7f6961 100644 --- a/commit-graph.h +++ b/commit-graph.h @@ -65,16 +65,24 @@ struct commit_graph *parse_commit_graph(void *graph_map, int fd, */ int generation_numbers_enabled(struct repository *r); -void write_commit_graph_reachable(const char *obj_dir, int append, - int report_progress); -void write_commit_graph(const char *obj_dir, - struct string_list *pack_indexes, - struct string_list *commit_hex, - int append, int report_progress); +#define COMMIT_GRAPH_APPEND (1 << 0) +#define COMMIT_GRAPH_PROGRESS (1 << 1) + +/* + * The write_commit_graph* methods return zero on success + * and a negative value on failure. Note that if the repository + * is not compatible with the commit-graph feature, then the + * methods will return 0 without writing a commit-graph. + */ +int write_commit_graph_reachable(const char *obj_dir, unsigned int flags); +int write_commit_graph(const char *obj_dir, + struct string_list *pack_indexes, + struct string_list *commit_hex, + unsigned int flags); int verify_commit_graph(struct repository *r, struct commit_graph *g); -void close_commit_graph(struct repository *); +void close_commit_graph(struct raw_object_store *); void free_commit_graph(struct commit_graph *); #endif