summaryrefslogtreecommitdiff
path: root/commit.h
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2016-09-08 21:35:54 -0700
committerJunio C Hamano <gitster@pobox.com>2016-09-08 21:35:54 -0700
commit69307312d1bee69d33151cee8ed5940c46d7ee39 (patch)
tree8c7ed3be35ac5d44c394c8e1aa2234265464849e /commit.h
parent86df11b1a46dd9c3e383b02d21f17d9329aff6e0 (diff)
parent5447a76aad4074c31e7c8a6299cc586435f385e9 (diff)
downloadgit-69307312d1bee69d33151cee8ed5940c46d7ee39.tar.gz
Merge branch 'rs/pull-signed-tag' into maint
When "git merge-recursive" works on history with many criss-cross merges in "verbose" mode, the names the command assigns to the virtual merge bases could have overwritten each other by unintended reuse of the same piece of memory. * rs/pull-signed-tag: commit: use FLEX_ARRAY in struct merge_remote_desc merge-recursive: fix verbose output for multiple base trees commit: factor out set_merge_remote_desc() commit: use xstrdup() in get_merge_parent()
Diffstat (limited to 'commit.h')
-rw-r--r--commit.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/commit.h b/commit.h
index adf57d6c94..15ee924f2f 100644
--- a/commit.h
+++ b/commit.h
@@ -356,9 +356,11 @@ extern void for_each_mergetag(each_mergetag_fn fn, struct commit *commit, void *
struct merge_remote_desc {
struct object *obj; /* the named object, could be a tag */
- const char *name;
+ char name[FLEX_ARRAY];
};
#define merge_remote_util(commit) ((struct merge_remote_desc *)((commit)->util))
+extern void set_merge_remote_desc(struct commit *commit,
+ const char *name, struct object *obj);
/*
* Given "name" from the command line to merge, find the commit object