Re: [PATCH v2] add -p: fix 2.17.0-rc* regression due to moved code

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

 



Ævar Arnfjörð Bjarmason  <avarab@xxxxxxxxx> writes:

> diff --git a/git-add--interactive.perl b/git-add--interactive.perl
> index d190469cd8..c1f52e457f 100755
> --- a/git-add--interactive.perl
> +++ b/git-add--interactive.perl
> @@ -1561,13 +1561,13 @@ sub patch_update_file {
>  			elsif ($line =~ m|^/(.*)|) {
>  				my $regex = $1;
>  				unless ($other =~ m|/|) {
>  					error_msg __("No other hunks to search\n");
>  					next;
>  				}
> -				if ($1 eq "") {
> +				if ($regex eq "") {
>  					print colored $prompt_color, __("search for regex? ");

Ah.  That "unless ... { }" thing is what was inserted recently, and
the patch is an obvious fix once the problem is pointed out.  Thanks
for a careful reading.

It makes me wonder what the original author, who already captured $1
in $regex, was thinking when he wrote the comparison with $1 there,
but that is OK---ithappend long time ago in early 2009.

Will apply.  Thanks.

>  					$regex = <STDIN>;
>  					if (defined $regex) {
>  						chomp $regex;
>  					}
>  				}



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

  Powered by Linux