Re: [PATCH v2] pull: merge into unborn by fast-forwarding from empty tree
- From
Thomas Rast <trast@inf.ethz.ch>
- Date
- Jun 20, 2013, 14:22 UTC
- Message-ID
- <87hags6ewl.fsf@linux-k42r.v.cablecom.net>
- In-Reply-To
- <aca810600b895ed3f0a3fc575e0f6861e591de5b.1371733403.git.trast@inf.ethz.ch>
Thomas Rast <trast@inf.ethz.ch> writes:
Show 12 quoted lines
> if test -z "$orig_head" > then > git update-ref -m "initial pull" HEAD $merge_head "$curr_head" && > - git read-tree -m -u HEAD || exit 1 > + # Two-way merge: we claim the index is based on an empty tree, > + # and try to fast-forward to HEAD. This ensures we will not > + # lose index/worktree changes that the user already made on > + # the unborn branch. > + empty_tree=4b825dc642cb6eb9a060e54bf8d69288fbee4904 > + git read-tree -m -u $empty_tree HEAD || exit 1 > exit > fi
I just noticed that I broke the && chaining here, so don't apply this just yet. I'll resend once we settle on the best strategy to generate conflicts (or not).
--
Thomas Rast
trast@{inf,student}.ethz.ch