Skip to content

Commit

Permalink
Merge branch 'dl/libify-a-few'
Browse files Browse the repository at this point in the history
Code in builtin/*, i.e. those can only be called from within
built-in subcommands, that implements bulk of a couple of
subcommands have been moved to libgit.a so that they could be used
by others.

* dl/libify-a-few:
  Lib-ify prune-packed
  Lib-ify fmt-merge-msg
  • Loading branch information
gitster committed Apr 28, 2020
2 parents 5b6864c + 9460fd4 commit 56a1d9c
Show file tree
Hide file tree
Showing 10 changed files with 727 additions and 716 deletions.
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -880,6 +880,7 @@ LIB_OBJS += ewah/ewah_rlw.o
LIB_OBJS += exec-cmd.o
LIB_OBJS += fetch-negotiator.o
LIB_OBJS += fetch-pack.o
LIB_OBJS += fmt-merge-msg.o
LIB_OBJS += fsck.o
LIB_OBJS += fsmonitor.o
LIB_OBJS += gettext.o
Expand Down Expand Up @@ -946,6 +947,7 @@ LIB_OBJS += progress.o
LIB_OBJS += promisor-remote.o
LIB_OBJS += prompt.o
LIB_OBJS += protocol.o
LIB_OBJS += prune-packed.o
LIB_OBJS += quote.o
LIB_OBJS += range-diff.o
LIB_OBJS += reachable.o
Expand Down
16 changes: 0 additions & 16 deletions builtin.h
Original file line number Diff line number Diff line change
Expand Up @@ -94,25 +94,9 @@
* command.
*/

#define DEFAULT_MERGE_LOG_LEN 20

extern const char git_usage_string[];
extern const char git_more_info_string[];

#define PRUNE_PACKED_DRY_RUN 01
#define PRUNE_PACKED_VERBOSE 02

void prune_packed_objects(int);

struct fmt_merge_msg_opts {
unsigned add_title:1,
credit_people:1;
int shortlog_len;
};

int fmt_merge_msg(struct strbuf *in, struct strbuf *out,
struct fmt_merge_msg_opts *);

/**
* If a built-in has DELAY_PAGER_CONFIG set, the built-in should call this early
* when it wishes to respect the `pager.foo`-config. The `cmd` is the name of
Expand Down
Loading

0 comments on commit 56a1d9c

Please sign in to comment.