pull: add merge-ff-only option
authorFelipe Contreras <felipe.contreras@gmail.com>
Wed, 28 Aug 2013 20:33:22 +0000 (15:33 -0500)
committerFelipe Contreras <felipe.contreras@gmail.com>
Thu, 1 May 2014 23:50:40 +0000 (18:50 -0500)
commit1373776d9ca7d9d79c2c2229bc0a43b2ddd7cfb8
tree1f3878b445820b22e43c170968125591a4035df4
parentb1e2c5f7b10fc19ce099cdfdf6f36b9bbb439c39
pull: add merge-ff-only option

It is very typical for Git newcomers to inadvertently create merges and
worst; inadvertently pushing them. This is one of the reasons many
experienced users prefer to avoid 'git pull', and recommend newcomers to
avoid it as well.

To avoid these problems and keep 'git pull' useful, it has been
suggested that 'git pull' barfs by default if the merge is
non-fast-forward, which unfortunately would break backwards
compatibility.

This patch leaves everything in place to enable this new mode, but it
only gets enabled if the user specifically configures it; pull.mode =
merge-ff-only.

Later on this mode can be enabled by default.

For the full discussion you can read:

http://thread.gmane.org/gmane.comp.version-control.git/225146/focus=225305

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Documentation/config.txt
git-pull.sh
t/t5520-pull.sh