Subject: Re: [PATCH v3 07/14] apply: make parse_git_header public

From: Junio C Hamano <[email-masked]>
Date: Tue, 09 Jul 2019 16:22:40 -0700

Thomas Gummerer <[email-masked]> writes:

> Maybe it would be even better to name it 'struct gitdiff_data', as
> it's really only used for those few functions?

Is it really the case where "these three are only used by the
codepath you made public"?  If so, I agree that "gitdiff_data" is a
perfectly good name for it.

I however had an impression that it is the oppposite, i.e. "the
codepath you made public only needs these three, but these three are
used by other (still private) parts, too."  If this is the case,
then "gitdiff_data" is a misnomer, if we were to embed an instance
inside apply_state.

It seems that it is not a good idea to do such embedding, and if
that is the case, "gitdiff_data" is a fine for the three-field
struct.

Thanks.