Thread (11 messages) flat view 11 messages, 3 authors, 2016-06-15

Re: [PATCH 1/2] Highlight keyboard shortcuts in git-add--interactive

From: Wincent Colaiuta <hidden>
Date: 2016-06-15 22:43:55

El 1/12/2007, a las 15:07, Wincent Colaiuta escribió:
+# filters out prefixes which have special meaning to  
list_and_choose()
+sub is_valid_prefix {
+	my $prefix = shift;
+	my $valid = (defined $prefix) &&
+	    !($prefix =~ /[\s,]/) && # separators
+	    !($prefix =~ /^-/) &&    # deselection
+	    !($prefix =~ /^\d+/) &&  # selection
+	    ($prefix ne '*');        # "all" wildcard
+}
Doh, that's supposed to be:

	return (defined $prefix)...

Not:

	my $valid = (defined $prefix)...

It actually works as is, but I had changed the "return" while working  
on the patch (for debugging) and forgot to change it back afterwards.

And yes, I did proofread the patch before sending it. I just didn't  
notice the first time around.

Cheers,
Wincent
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help