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

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

From: Jeff King <hidden>
Date: 2016-06-15 22:43:54

Possibly related (same subject, not in this thread)

On Thu, Nov 29, 2007 at 01:00:38PM +0100, Wincent Colaiuta wrote:
A new function is added to detect the shortest unique prefix and this
is used to decide what to highlight. Highlighting is also applied when
choosing files.
I think this is very nicely implemented.

Acked-by: Jeff King <redacted>
+# returns an array of tuples (prefix, remainder)
+sub find_unique_prefixes {
+	my @stuff = @_;
I know we generally use this more C-ish argument convention to document
"here are the arguments to this function", but it does actually make a
copy of the @_ array (and using @_ implies a potentially large number of
arguments).

It probably doesn't matter here, though, since add--interactive is not
performance critical, and you probably can't have more than a few dozen
entries before it becomes unreadable anyway.

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