git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 4/5] merge: make function try_merge_command non static

From
Christian Couder <chriscool@tuxfamily.org>
Date
Mar 31, 2010, 19:22 UTC
Message-ID
<20100331192209.5827.23048.chriscool@tuxfamily.org>
In-Reply-To
<20100331192014.5827.90637.chriscool@tuxfamily.org>

and while at it let's move declaration of checkout_fast_forward() into "merge-recursive.h" instead of "cache.h"

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
---
 builtin/merge.c   |    4 ++--
 cache.h           |    3 ---
 merge-recursive.h |    4 ++++
 3 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/builtin/merge.c b/builtin/merge.c
index f163d53..fc240f9 100644
--- a/builtin/merge.c
+++ b/builtin/merge.c
@@ -548,8 +548,8 @@ static void write_tree_trivial(unsigned char *sha1)
 		die("git write-tree failed to write a tree");
 }
 
-static int try_merge_command(const char *strategy, struct commit_list *common,
-			     const char *head_arg, struct commit_list *remotes)
+int try_merge_command(const char *strategy, struct commit_list *common,
+		      const char *head_arg, struct commit_list *remotes)
 {
 	const char **args;
 	int i = 0, x = 0, ret;
diff --git a/cache.h b/cache.h
index 32c18b1..b065721 100644
--- a/cache.h
+++ b/cache.h
@@ -1059,7 +1059,4 @@ void overlay_tree_on_cache(const char *tree_name, const char *prefix);
 char *alias_lookup(const char *alias);
 int split_cmdline(char *cmdline, const char ***argv);
 
-/* builtin/merge.c */
-int checkout_fast_forward(const unsigned char *from, const unsigned char *to);
-
 #endif /* CACHE_H */
diff --git a/merge-recursive.h b/merge-recursive.h
index d1192f5..9eb7e2d 100644
--- a/merge-recursive.h
+++ b/merge-recursive.h
@@ -54,4 +54,8 @@ int merge_recursive_generic(struct merge_options *o,
 void init_merge_options(struct merge_options *o);
 struct tree *write_tree_from_memory(struct merge_options *o);
 
+/* builtin/merge.c */
+int checkout_fast_forward(const unsigned char *from, const unsigned char *to);
+int try_merge_command(const char *strategy, struct commit_list *common, const char *head_arg, struct commit_list *remotes);
+
 #endif
-- 
1.7.0.3.454.gd9aeb
Previous: Christian CouderNext: Christian Couder
Message 5 of 6 in “add a --strategy option to "git cherry-pick"”
  1. 0/5 add a --strategy option to "git cherry-pick"Christian Couder, Mar 31, 2010
  2. 1/5 revert: use strbuf to refactor the code that writes the merge messageChristian Couder, Mar 31, 2010
  3. 2/5 revert: refactor merge recursive code into its own functionChristian Couder, Mar 31, 2010
  4. 3/5 merge: refactor code that calls "git merge-STRATEGY"Christian Couder, Mar 31, 2010
  5. 4/5 merge: make function try_merge_command non staticChristian Couder, Mar 31, 2010
  6. 5/5 revert: add "--strategy" option to choose merge strategyChristian Couder, Mar 31, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.