Skip to contentSkip to conversation

Make merge-base a built-in.

PATCH In review Junio C Hamano 2 participants 3 messages Jun 15, 2016 Kbuild

lore
Share & tools
lore
#0 lore raw

PATCH 5/6 Make merge-base a built-in.

---
 Makefile             |    2 +-
 builtin-merge-base.c |   87 +++++++++++++++++++++++++++++++++++++++++++++++++
 builtin.h            |    1 +
 git.c                |    1 +
 merge-base.c         |   88 --------------------------------------------------
 5 files changed, 90 insertions(+), 89 deletions(-)
Makefile +1 -1
index 6c12bc6..7fcc3ff 100644
@@ -191,7 +191,6 @@ SCRIPTS = $(patsubst %.sh,%,$(SCRIPT_SH)) \
 PROGRAMS = \
 	git-convert-objects$X git-fetch-pack$X git-fsck-objects$X \
 	git-hash-object$X git-index-pack$X git-local-fetch$X \
-	git-merge-base$X \
 	git-daemon$X \
 	git-merge-index$X git-mktag$X git-mktree$X git-patch-id$X \
 	git-peek-remote$X git-receive-pack$X \
@@ -286,6 +285,7 @@ BUILTIN_OBJS = \
 	builtin-ls-tree.o \
 	builtin-mailinfo.o \
 	builtin-mailsplit.o \
+	builtin-merge-base.o \
 	builtin-merge-file.o \
 	builtin-mv.o \
 	builtin-name-rev.o \
builtin-merge-base.c new file +87 -0

87 lines not on this page · raw message

builtin.h +1 -0
index df72d09..ae32993 100644
@@ -42,6 +42,7 @@ extern int cmd_ls_files(int argc, const char **argv, const char *prefix);
 extern int cmd_ls_tree(int argc, const char **argv, const char *prefix);
 extern int cmd_mailinfo(int argc, const char **argv, const char *prefix);
 extern int cmd_mailsplit(int argc, const char **argv, const char *prefix);
+extern int cmd_merge_base(int argc, const char **argv, const char *prefix);
 extern int cmd_merge_file(int argc, const char **argv, const char *prefix);
 extern int cmd_mv(int argc, const char **argv, const char *prefix);
 extern int cmd_name_rev(int argc, const char **argv, const char *prefix);
git.c +1 -0
index bf55499..e7bc79a 100644
@@ -238,6 +238,7 @@ static void handle_internal_command(int argc, const char **argv, char **envp)
 		{ "ls-tree", cmd_ls_tree, RUN_SETUP },
 		{ "mailinfo", cmd_mailinfo },
 		{ "mailsplit", cmd_mailsplit },
+		{ "merge-base", cmd_merge_base, RUN_SETUP },
 		{ "merge-file", cmd_merge_file },
 		{ "mv", cmd_mv, RUN_SETUP },
 		{ "name-rev", cmd_name_rev, RUN_SETUP },
merge-base.c deleted +0 -88

88 lines not on this page · raw message

Signature · 1 line
1.4.4.4.g564d
#1 lore raw

Hi,

Quoted 2 lines · Junio C Hamano
 builtin-merge-base.c |   87 +++++++++++++++++++++++++++++++++++++++++++++++++
 merge-base.c         |   88 --------------------------------------------------

Hmm. I wonder if we should make "-M" a default for format-patch... But then, some use git to develop against a non-git upstream, and sending such patches might upset the upstream maintainers...

Anyway, I think this series is sane (i.e. I did not find obvious flaws reading them).

Ciao,
Dscho

#2 lore raw
Quoted 2 lines · Johannes Schindelin

Anyway, I think this series is sane (i.e. I did not find obvious flaws reading them).

Heh, there were a few "easter eggs" in the one that are currently sitting on 'pu', but don't waste your time go hunting since I've fixed them up in my tree over lunch break.