merge: let custom strategies intervene in trivial merges

As v1.6.1-rc1~294^2 (2008-08-23) explains, custom merge strategies
do not even kick in when the merge is truly trivial.  But they
should, since otherwise a custom “--strategy=theirs” is not useful.

Perhaps custom strategies should not allow fast-forward either.  This
patch does not make that change, since it is less important (because
it is always possible to explicitly use --no-ff).

Reported-by: Yaroslav Halchenko <debian@onerussian.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Jonathan Nieder
2010-08-15 20:11:06 -05:00
committed by Junio C Hamano
parent 6209036c78
commit 52b48ef1e4
2 changed files with 34 additions and 3 deletions

View File

@ -131,6 +131,7 @@ static struct strategy *get_strategy(const char *name)
ret = xcalloc(1, sizeof(struct strategy));
ret->name = xstrdup(name);
ret->attr = NO_TRIVIAL;
return ret;
}