Re: [RFC] Merge strategy 'applyreject'

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

 



Shawn Pearce wrote:

> -- >8 --
> Create merge strategy 'applyreject'.
> 
> The applyreject merge strategy is a two head merge strategy which performs
> the merge by obtaining the diff between the common base and the branch
> being merged and applies it to the current branch using git-apply --reject.
> Consequently any failures are written to .rej files, rather than using
> the RCS <<<<<<< ======= >>>>>>> format.

Nice.

> ---
>  .gitignore               |    1 +
>  Makefile                 |    1 +
>  git-merge-applyreject.sh |   26 ++++++++++++++++++++++++++
>  git-merge.sh             |    2 +-
>  4 files changed, 29 insertions(+), 1 deletions(-)

But where documentation (Documentation/merge-strategies.txt)? 

> +#!/bin/sh
> +#
> +# Simple merge strategy which produces reject files on failed merges.
> +# Only handles two heads and one merge base, thus the command line
> +# parameters must be:  base -- head1 head2

We can always get the base using git-merge-base, so the arguments could
be either "base -- head1 head2", or just "head1 head2".

Does "git pull -s applyreject . head2" works (when on head1) with
this patch? Does the unified driver git-merge works correctly?

> +git-diff --binary -M $base $incoming \
> +     | git-apply --index --reject --verbose

--index or --cached?

-- 
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git


-
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]