Re: [PATCH] Move try_merge_command and checkout_fast_forward to libgit.a
- From
Nguyen Thai Ngoc Duy <pclouds@gmail.com>
- Date
- Oct 25, 2012, 12:50 UTC
- Message-ID
- <CACsJy8D1_c9NP_nwvp6uJyKikG+_jqnm1hVEs_t_wnsYTLZ4Yg@mail.gmail.com>
- In-Reply-To
- <20121025094500.GJ8390@sigill.intra.peff.net>
On Thu, Oct 25, 2012 at 4:45 PM, Jeff King <peff@peff.net> wrote:
Show 15 quoted lines
> On Tue, Oct 23, 2012 at 09:24:51AM +0700, Nguyen Thai Ngoc Duy wrote: > >> These functions are called in sequencer.c, which is part of >> libgit.a. This makes libgit.a potentially require builtin/merge.c for >> external git commands. >> >> Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> >> --- >> I made some unrelated changes in sequencer.c and this problem shown >> up. merge-recursive.c is probably not the best place for these >> functions. I just don't want to create merge.c for them. > > I'm fine with this conceptually, but merge-recursive really is the wrong > place. I'd much rather see a new merge.c to collect merge-related helper > functions that are not strategy-specific.
OK. I checked around for similar issues and found these used by libgit.a but stay in builtin/ instead:
estimate_bisect_steps: bisect.c and builtin/rev-list.c print_commit_list: bisect.c and builtin/rev-list.c
-> move them to bisect.c? another candidate is revision.c.
fetch_pack: transport.c and builtin/fetch-pack.c send_pack: transport.c and builtin/send-pack.c
-> move them to transport.c? or new files fetch-pack.c and send-pack.c? I haven't check how many functions they may pull together.
setup_diff_pager: diff-no-index.c and builtin/diff.c
-> to diff-lib.c?
-- Duy