summaryrefslogtreecommitdiffstats
path: root/merge-recursive.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2023-10-21 01:23:10 +0200
committerJunio C Hamano <gitster@pobox.com>2023-10-21 01:23:11 +0200
commitc662038629a5fb9b604df0f4ae5d812799de52fe (patch)
tree9bdc3c1b4feaa0050d7257565bae8defa1a7bcc4 /merge-recursive.c
parentThe nineteenth batch (diff)
parentmerge: introduce {copy|clear}_merge_options() (diff)
downloadgit-c662038629a5fb9b604df0f4ae5d812799de52fe.tar.xz
git-c662038629a5fb9b604df0f4ae5d812799de52fe.zip
Merge branch 'ty/merge-tree-strategy-options'
"git merge-tree" learned to take strategy backend specific options via the "-X" option, like "git merge" does. * ty/merge-tree-strategy-options: merge: introduce {copy|clear}_merge_options() merge-tree: add -X strategy option
Diffstat (limited to 'merge-recursive.c')
-rw-r--r--merge-recursive.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/merge-recursive.c b/merge-recursive.c
index 0d7e57e2df..e3beb0801b 100644
--- a/merge-recursive.c
+++ b/merge-recursive.c
@@ -3912,6 +3912,22 @@ void init_merge_options(struct merge_options *opt,
opt->buffer_output = 0;
}
+/*
+ * For now, members of merge_options do not need deep copying, but
+ * it may change in the future, in which case we would need to update
+ * this, and also make a matching change to clear_merge_options() to
+ * release the resources held by a copied instance.
+ */
+void copy_merge_options(struct merge_options *dst, struct merge_options *src)
+{
+ *dst = *src;
+}
+
+void clear_merge_options(struct merge_options *opt UNUSED)
+{
+ ; /* no-op as our copy is shallow right now */
+}
+
int parse_merge_opt(struct merge_options *opt, const char *s)
{
const char *arg;