diff options
author | Derrick Stolee <dstolee@microsoft.com> | 2019-06-12 06:29:38 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2019-06-12 11:20:53 -0700 |
commit | 5af803945212af875670582ff153ee05ec368b83 (patch) | |
tree | 8bb9b6ccb72fc7f8024428991eabf07c31554f68 /commit-graph.h | |
parent | commit-graph: return with errors during write (diff) | |
download | tgif-5af803945212af875670582ff153ee05ec368b83.tar.xz |
commit-graph: collapse parameters into flags
The write_commit_graph() and write_commit_graph_reachable() methods
currently take two boolean parameters: 'append' and 'report_progress'.
As we update these methods, adding more parameters this way becomes
cluttered and hard to maintain.
Collapse these parameters into a 'flags' parameter, and adjust the
callers to provide flags as necessary.
Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'commit-graph.h')
-rw-r--r-- | commit-graph.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/commit-graph.h b/commit-graph.h index 869717ca19..01538b5cf5 100644 --- a/commit-graph.h +++ b/commit-graph.h @@ -65,18 +65,20 @@ struct commit_graph *parse_commit_graph(void *graph_map, int fd, */ int generation_numbers_enabled(struct repository *r); +#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, int append, - int report_progress); +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, - int append, int report_progress); + unsigned int flags); int verify_commit_graph(struct repository *r, struct commit_graph *g); |