From: "Nguyễn Thái Ngọc Duy" <pclouds@gmail.com>
To: git@vger.kernel.org
Cc: "Jeff King" <peff@peff.net>, "Nguyễn Thái Ngọc Duy" <pclouds@gmail.com>
Subject: [PATCH 0/7] Move code from builtin to libgit.a
Date: Fri, 26 Oct 2012 22:53:48 +0700 [thread overview]
Message-ID: <1351266835-22610-1-git-send-email-pclouds@gmail.com> (raw)
In-Reply-To: <20121026120253.GA1455@sigill.intra.peff.net>
On Fri, Oct 26, 2012 at 7:02 PM, Jeff King <peff@peff.net> wrote:
>> OK. I checked around for similar issues and found these used by
>> libgit.a but stay in builtin/ instead:
>
> Yeah, we have traditionally been kind of lazy about the distinction,
> because it doesn't really matter for our build system (i.e., libgit.a is
> not _really_ a library, but just a convenience in the build process). So
> one option is just not caring about these.
Yeah. We can fix it up when we encounter new undefined reference
errors (e.g. a new test program that links to libgit.a). Anyway it
does not look too difficult to do. Take it or drop it. Your call.
> I'm also fine with fixing.
>
>> 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.
>
> I'd probably say bisect.c for the first, and commit.c for the latter
> (that is where commit_list functions are defined, and it is really about
> that).
Makes sense.
>> setup_diff_pager: diff-no-index.c and builtin/diff.c
>>
>> -> to diff-lib.c?
>
> I'm not sure (to be honest, I am not even sure of the intended
> difference between diff.c and diff-lib.c). That function is really not
> for general diffing, but for diff-like commands. Probably it would be OK
> in diff.c.
Ditto. check_pager_config() is also moved from git.c to pager.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.
>
> I think I'd rather have fetch-pack.c and send-pack.c than putting them
> into transport.c (which is getting kind of bloated already).
These two are big code moves, basically all {fetch,send}-pack code.
While I think this is good cleanup (I get surprise every time I look
at transport.c and it leads to buitin/fetch-pack.c), this is probably
not a good idea if we have on flight topics, which may cause lots of
conflicts for you and Junio. Fortunately we don't at the moment.
Nguyễn Thái Ngọc Duy (7):
Move try_merge_command and checkout_fast_forward to libgit.a
Move estimate_bisect_steps to libgit.a
Move print_commit_list to libgit.a
Move setup_diff_pager to libgit.a
send-pack: move core code to libgit.a
fetch-pack: remove global (static) configuration variable "args"
fetch-pack: move core code to libgit.a
Makefile | 3 +
bisect.c | 38 ++
bisect.h | 4 -
builtin.h | 4 -
builtin/diff.c | 16 -
builtin/fetch-pack.c | 951 +--------------------------------------------------
builtin/merge.c | 106 +-----
builtin/rev-list.c | 49 ---
builtin/send-pack.c | 333 ------------------
cache.h | 12 +-
commit.c | 10 +
commit.h | 4 +
diff.c | 16 +
diff.h | 1 +
fetch-pack.c | 951 +++++++++++++++++++++++++++++++++++++++++++++++++++
git.c | 33 --
merge-recursive.h | 5 -
merge.c | 112 ++++++
pager.c | 34 ++
send-pack.c | 344 +++++++++++++++++++
sequencer.c | 2 +-
transport.h | 5 +
22 files changed, 1535 insertions(+), 1498 deletions(-)
create mode 100644 fetch-pack.c
create mode 100644 merge.c
create mode 100644 send-pack.c
--
1.8.0.rc2.23.g1fb49df
next prev parent reply other threads:[~2012-10-26 15:54 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-23 2:24 [PATCH] Move try_merge_command and checkout_fast_forward to libgit.a Nguyễn Thái Ngọc Duy
2012-10-25 9:45 ` Jeff King
2012-10-25 12:50 ` Nguyen Thai Ngoc Duy
2012-10-26 12:02 ` Jeff King
2012-10-26 15:53 ` Nguyễn Thái Ngọc Duy [this message]
2012-10-26 15:53 ` [PATCH 1/7] " Nguyễn Thái Ngọc Duy
2012-10-26 15:53 ` [PATCH 2/7] Move estimate_bisect_steps " Nguyễn Thái Ngọc Duy
2012-10-26 15:53 ` [PATCH 3/7] Move print_commit_list " Nguyễn Thái Ngọc Duy
2012-10-26 15:53 ` [PATCH 4/7] Move setup_diff_pager " Nguyễn Thái Ngọc Duy
2012-10-26 15:53 ` [PATCH 5/7] send-pack: move core code " Nguyễn Thái Ngọc Duy
2012-10-26 15:53 ` [PATCH 6/7] fetch-pack: remove global (static) configuration variable "args" Nguyễn Thái Ngọc Duy
2012-10-26 15:53 ` [PATCH 7/7] fetch-pack: move core code to libgit.a Nguyễn Thái Ngọc Duy
2012-10-29 7:43 ` [PATCH 0/7] Move code from builtin " Jeff King
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1351266835-22610-1-git-send-email-pclouds@gmail.com \
--to=pclouds@gmail.com \
--cc=git@vger.kernel.org \
--cc=peff@peff.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.