Re: [PATCH v2 10/94] builtin/apply: move 'unidiff_zero' global into 'struct apply_state'
- From
Christian Couder <christian.couder@gmail.com>
- Date
- May 12, 2016, 20:18 UTC
- Message-ID
- <CAP8UFD02iZ6fszG-T2xjajyjHwOSXbwtV07n7s2hVW2o-LVusg@mail.gmail.com>
- In-Reply-To
- <xmqq1t57f54n.fsf@gitster.mtv.corp.google.com>
On Thu, May 12, 2016 at 9:28 PM, Junio C Hamano <gitster@pobox.com> wrote:
Show 15 quoted lines
> Christian Couder <christian.couder@gmail.com> writes: > >> To libify the apply functionality the 'unidiff_zero' variable should >> not be static and global to the file. Let's move it into >> 'struct apply_state'. >> >> Reviewed-by: Stefan Beller <sbeller@google.com> >> Signed-off-by: Christian Couder <chriscool@tuxfamily.org> >> --- > > Looks correct; I would have expected from the flow of thought in the > series that p_value and linenr that were already mentioned would be > the first two to be put in this, but that would have to wait until > more functions are taught to pass the state around, so this ordering > would probably be fine.
Yeah, if the patches that put p_value and linenr into 'struct apply_state' were earlier in the series, they would have to pass the state around to a lot more functions, so they would have been very big.