Re: [PATCH v2] pull: merge into unborn by fast-forwarding from empty tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thomas Rast <trast@xxxxxxxxxxx> writes:

>  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
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]