summaryrefslogtreecommitdiff
path: root/submodule.h
diff options
context:
space:
mode:
authorStefan Beller <sbeller@google.com>2018-05-15 20:00:28 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-05-16 01:08:43 (GMT)
commit18cfc0886617e28fb6d29d579bec0ffcdb439196 (patch)
tree70f603f53147672e2a41e3dd4f82f66d3bb80e58 /submodule.h
parentccdcbd54c4475c2238b310f7113ab3075b5abc9c (diff)
downloadgit-18cfc0886617e28fb6d29d579bec0ffcdb439196.zip
git-18cfc0886617e28fb6d29d579bec0ffcdb439196.tar.gz
git-18cfc0886617e28fb6d29d579bec0ffcdb439196.tar.bz2
submodule.c: move submodule merging to merge-recursive.c
In a later patch we want to improve submodule merging by using the output() function in merge-recursive.c for submodule merges to deliver a consistent UI to users. To do so we could either make the output() function globally available so we can use it in submodule.c#merge_submodule(), or we could integrate the submodule merging into the merging code. Choose the later as we generally want to move submodules closer into the core. Therefore we move any function related to merging submodules (merge_submodule(), find_first_merges() and print_commit) to merge-recursive.c. We'll keep add_submodule_odb() in submodule.c as it is used by other submodule functions. While at it, add a TODO note that we do not really like the function add_submodule_odb(). This commit is best viewed with --color-moved. Signed-off-by: Stefan Beller <sbeller@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'submodule.h')
-rw-r--r--submodule.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/submodule.h b/submodule.h
index e5526f6..b96689a 100644
--- a/submodule.h
+++ b/submodule.h
@@ -89,10 +89,8 @@ extern int submodule_uses_gitfile(const char *path);
#define SUBMODULE_REMOVAL_IGNORE_UNTRACKED (1<<1)
#define SUBMODULE_REMOVAL_IGNORE_IGNORED_UNTRACKED (1<<2)
extern int bad_to_remove_submodule(const char *path, unsigned flags);
-extern int merge_submodule(struct object_id *result, const char *path,
- const struct object_id *base,
- const struct object_id *a,
- const struct object_id *b, int search);
+
+int add_submodule_odb(const char *path);
/* Checks if there are submodule changes in a..b. */
extern int submodule_touches_in_range(struct object_id *a,