Re: [PATCH 06/16] shortlog: add missing declaration
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Oct 31, 2013, 19:05 UTC
- Message-ID
- <xmqqk3gt5kht.fsf@gitster.dls.corp.google.com>
- In-Reply-To
- <1383211547-9145-7-git-send-email-felipe.contreras@gmail.com>
Felipe Contreras <felipe.contreras@gmail.com> writes:
> Otherwise we would have to include commit.h.
Was there a reason why commit.h is not included here, just like revision.h would include diff.h, so that users of shortlog.h do not have to worry about including commit.h themselves?
Note: not requesting the patch to be changed; just inquiring the reasoning behind a different approach to solve related/same problem.
Show 18 quoted lines
> Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
> ---
> shortlog.h | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/shortlog.h b/shortlog.h
> index de4f86f..54bc07c 100644
> --- a/shortlog.h
> +++ b/shortlog.h
> @@ -19,6 +19,8 @@ struct shortlog {
> struct string_list mailmap;
> };
>
> +struct commit;
> +
> void shortlog_init(struct shortlog *log);
>
> void shortlog_add_commit(struct shortlog *log, struct commit *commit);