diff options
author | Jonathan Nieder <jrnieder@gmail.com> | 2010-03-21 01:38:58 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-03-21 04:36:11 +0100 |
commit | f01de62e4591a6acc061eb994d44f7eeef7a0cfd (patch) | |
tree | 85ede25d7697736056133412abae4739fa79cb36 /builtin | |
parent | merge-file --diff3: add a label for ancestor (diff) | |
download | git-f01de62e4591a6acc061eb994d44f7eeef7a0cfd.tar.xz git-f01de62e4591a6acc061eb994d44f7eeef7a0cfd.zip |
ll_merge(): add ancestor label parameter for diff3-style output
Commands using the ll_merge() function will present conflict hunks
imitating ‘diff3 -m’ output if the merge.conflictstyle configuration
option is set appropriately. Unlike ‘diff3 -m’, the output does not
include a label for the merge base on the ||||||| line of the output,
and some tools misparse the conflict hunks without that.
Add a new ancestor_label parameter to ll_merge() to give callers the
power to rectify this situation. If ancestor_label is NULL, the output
format is unchanged. All callers pass NULL for now.
Requested-by: Stefan Monnier <monnier@iro.umontreal.ca>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin')
-rw-r--r-- | builtin/checkout.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/checkout.c b/builtin/checkout.c index acefaaf41a..d67f809a9c 100644 --- a/builtin/checkout.c +++ b/builtin/checkout.c @@ -149,7 +149,7 @@ static int checkout_merged(int pos, struct checkout *state) read_mmblob(&ours, active_cache[pos+1]->sha1); read_mmblob(&theirs, active_cache[pos+2]->sha1); - status = ll_merge(&result_buf, path, &ancestor, + status = ll_merge(&result_buf, path, &ancestor, NULL, &ours, "ours", &theirs, "theirs", 0); free(ancestor.ptr); free(ours.ptr); |