]> git.ipfire.org Git - thirdparty/git.git/commit - builtin/pull.c
pull: implement pulling into an unborn branch
authorPaul Tan <pyokagan@gmail.com>
Thu, 18 Jun 2015 10:54:06 +0000 (18:54 +0800)
committerJunio C Hamano <gitster@pobox.com>
Thu, 18 Jun 2015 20:17:32 +0000 (13:17 -0700)
commit49ec402d52dc8f8e55e62537c95766b623e63d6b
tree242314d869d00b6d744b510acdd6d85ece9f2b2e
parentfe911b8ca0b466697b38880512ea2b28f2699dbd
pull: implement pulling into an unborn branch

b4dc085 (pull: merge into unborn by fast-forwarding from empty
tree, 2013-06-20) established git-pull's current behavior of pulling
into an unborn branch by fast-forwarding the work tree from an empty
tree to the merge head, then setting HEAD to the merge head.

Re-implement this behavior by introducing pull_into_void() which will be
called instead of run_merge() if HEAD is invalid.

Helped-by: Stephen Robin <stephen.robin@gmail.com>
Signed-off-by: Paul Tan <pyokagan@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/pull.c