git merge -X<option>
Teach "-X <option>" command line argument to "git merge" that is passed to strategy implementations. "ours" and "theirs" autoresolution introduced by the previous commit can be asked to the recursive strategy. Signed-off-by: Avery Pennarun <apenwarr@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
73eb40eeaa
commit
8cc5b29065
9
strbuf.c
9
strbuf.c
@ -10,6 +10,15 @@ int prefixcmp(const char *str, const char *prefix)
|
||||
return (unsigned char)*prefix - (unsigned char)*str;
|
||||
}
|
||||
|
||||
int suffixcmp(const char *str, const char *suffix)
|
||||
{
|
||||
int len = strlen(str), suflen = strlen(suffix);
|
||||
if (len < suflen)
|
||||
return -1;
|
||||
else
|
||||
return strcmp(str + len - suflen, suffix);
|
||||
}
|
||||
|
||||
/*
|
||||
* Used as the default ->buf value, so that people can always assume
|
||||
* buf is non NULL and ->buf is NUL terminated even for a freshly
|
||||
|
Reference in New Issue
Block a user