merge: handle --ff/--no-ff/--ff-only as a tri-state option
authorMiklos Vajna <vmiklos@suse.cz>
Tue, 2 Jul 2013 14:47:57 +0000 (16:47 +0200)
committerJunio C Hamano <gitster@pobox.com>
Tue, 2 Jul 2013 20:08:42 +0000 (13:08 -0700)
These three options mean "favor fast-forwarding when possible,
without creating an unnecessary merge", "never fast-forward and
always create a merge commit even when the commit being merged is a
strict descendant", and "we do not want to create any merge commit;
update only when the merged commit is a strict descendant".

They are "pick one out of these three possibilities" options, and
correspond to "merge.ff" configuration that is tri-state (yes, no
and only).

However, the implementation did not follow the usual convention for
the command line options (later one wins, and command line overrides
what is in the configuration).

Fix this by consolidating two variables (fast_forward_only and
allow_fast_forward) used in the implementation into one enum that
can take one of the three possible values.

Signed-off-by: Miklos Vajna <vmiklos@suse.cz>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
No differences found