Re: [PATCH] git-svn: check_cherry_pick should exclude commits already in our history

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

 



Steven Walter <stevenrwalter@xxxxxxxxx> wrote:
> From: Steven Walter <swalter@xxxxxxxxxxxxxxxxxxxxxxxx>
> 
> The merge-base between @$parents and $merge_tip may have been reached
> through a merge commit.  This means that some commits that are ancestors
> of @$parents will not be ancestors of $merge_base.  The mergeinfo
> property will not list commits that are ancestors of @$parents, so we
> need to explicitly exclude them.

Thanks Steven, looks reasonable to me.  Sign-off?

Sam: any objections?

Acked-by: Eric Wong <normalperson@xxxxxxxx>

> ---
>  git-svn.perl |    4 +++-
>  1 files changed, 3 insertions(+), 1 deletions(-)
> 
> diff --git a/git-svn.perl b/git-svn.perl
> index 7a72f75..70edf80 100755
> --- a/git-svn.perl
> +++ b/git-svn.perl
> @@ -3087,9 +3087,10 @@ sub _rev_list {
>  sub check_cherry_pick {
>  	my $base = shift;
>  	my $tip = shift;
> +	my $parents = shift;
>  	my @ranges = @_;
>  	my %commits = map { $_ => 1 }
> -		_rev_list("--no-merges", $tip, "--not", $base);
> +		_rev_list("--no-merges", $tip, "--not", $base, @$parents);
>  	for my $range ( @ranges ) {
>  		delete @commits{_rev_list($range)};
>  	}
> @@ -3249,6 +3250,7 @@ sub find_extra_svn_parents {
>  		# double check that there are no missing non-merge commits
>  		my (@incomplete) = check_cherry_pick(
>  			$merge_base, $merge_tip,
> +			$parents,
>  			@$ranges,
>  		       );
>  
> -- 
--
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]