Re: [PATCH] add -p: skip conflicted paths

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

 



Erik Faye-Lund <kusmabite@xxxxxxxxx> writes:

> diff --git a/git-add--interactive.perl b/git-add--interactive.perl
> index 8f0839d..a52507f 100755
> --- a/git-add--interactive.perl
> +++ b/git-add--interactive.perl
> @@ -1259,6 +1259,13 @@ sub patch_update_file {
>  	my $quit = 0;
>  	my ($ix, $num);
>  	my $path = shift;
> +
> +	# skip conflicted paths
> +	if (run_cmd_pipe(qw(git ls-files -u --), $path)) {
> +		print colored $error_color, "Warning: $path is in conflicted state, skipping.\n";
> +		return 0;
> +	}
> +

Thanks.

I have to wonder if the filtering should go to much higher level in the
callchain.

Perhaps teach list_modified(), which currently takes 'file-only' and
'index-only', to also take an option to omit (and warn if it is
appropriate) unmerged paths?
--
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]