Re: [PATCH v7 20/22] commit-graph: add '--reachable' option
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jun 27, 2018, 17:53 UTC
- Message-ID
- <xmqqy3f0f74u.fsf@gitster-ct.c.googlers.com>
- In-Reply-To
- <20180627132447.142473-21-dstolee@microsoft.com>
Derrick Stolee <stolee@gmail.com> writes:
Show 21 quoted lines
> diff --git a/commit-graph.c b/commit-graph.c
> index a06e7e9549..adf54e3fe7 100644
> --- a/commit-graph.c
> +++ b/commit-graph.c
> @@ -7,6 +7,7 @@
> #include "packfile.h"
> #include "commit.h"
> #include "object.h"
> +#include "refs.h"
> #include "revision.h"
> #include "sha1-lookup.h"
> #include "commit-graph.h"
> @@ -656,6 +657,23 @@ static void compute_generation_numbers(struct packed_commit_list* commits)
> }
> }
>
> +static int add_ref_to_list(const char *refname,
> + const struct object_id *oid,
> + int flags, void *cb_data)
> +{
> + struct string_list *list = (struct string_list*)cb_data;Style: "(struct string_list *)cb_data"
Also please have a blank line here between the decls and the first statement.
> + string_list_append(list, oid_to_hex(oid)); > + return 0; > +}