diff options
author | Jonathan Nieder <jrnieder@gmail.com> | 2010-03-20 19:35:18 -0500 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-03-20 20:36:10 -0700 |
commit | a4b5e91c49238146f4cb85ff5f7f3bc97e0e51de (patch) | |
tree | 3870b41f8a7cd493288400d14657db961e409fe4 /xdiff/xdiff.h | |
parent | 8a161433a0b414d15093e312eb9be99587074309 (diff) | |
download | git-a4b5e91c49238146f4cb85ff5f7f3bc97e0e51de.tar.gz |
xdl_merge(): move file1 and file2 labels to xmparam structure
The labels for the three participants in a potential conflict are all
optional arguments for the xdiff merge routine; if they are NULL, then
xdl_merge() can cope by omitting the labels from its output. Move
them to the xmparam structure to allow new callers to save some
keystrokes where they are not needed.
This also has the virtue of making the xdiff merge interface more
similar to merge_trees, which might make it easier to learn.
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'xdiff/xdiff.h')
-rw-r--r-- | xdiff/xdiff.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/xdiff/xdiff.h b/xdiff/xdiff.h index 6eb5fffde1..711048ea36 100644 --- a/xdiff/xdiff.h +++ b/xdiff/xdiff.h @@ -118,12 +118,13 @@ typedef struct s_xmparam { int favor; int style; const char *ancestor; /* label for orig */ + const char *file1; /* label for mf1 */ + const char *file2; /* label for mf2 */ } xmparam_t; #define DEFAULT_CONFLICT_MARKER_SIZE 7 -int xdl_merge(mmfile_t *orig, mmfile_t *mf1, const char *name1, - mmfile_t *mf2, const char *name2, +int xdl_merge(mmfile_t *orig, mmfile_t *mf1, mmfile_t *mf2, xmparam_t const *xmp, mmbuffer_t *result); #ifdef __cplusplus |