Move try_merge_command and checkout_fast_forward to libgit.a

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>
Signed-off-by: Jeff King <peff@peff.net>
This commit is contained in:
Nguyễn Thái Ngọc Duy
2012-10-26 22:53:49 +07:00
committed by Jeff King
parent 2cfceefaca
commit db699a8a1f
6 changed files with 125 additions and 112 deletions

11
cache.h
View File

@ -1265,8 +1265,15 @@ struct startup_info {
};
extern struct startup_info *startup_info;
/* builtin/merge.c */
int checkout_fast_forward(const unsigned char *from, const unsigned char *to);
/* merge.c */
struct commit_list;
int try_merge_command(const char *strategy, size_t xopts_nr,
const char **xopts, struct commit_list *common,
const char *head_arg, struct commit_list *remotes);
int checkout_fast_forward(const unsigned char *from,
const unsigned char *to,
int overwrite_ignore);
int sane_execvp(const char *file, char *const argv[]);