git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Highlight keyboard shortcuts in git-add--interactive
@ 2007-11-21 14:27 Wincent Colaiuta
  2007-11-21 14:32 ` Matthieu Moy
                   ` (2 more replies)
  0 siblings, 3 replies; 17+ messages in thread
From: Wincent Colaiuta @ 2007-11-21 14:27 UTC (permalink / raw)
  To: git; +Cc: gitster, Wincent Colaiuta

The user interface provided by the command loop in git-add--interactive
gives the impression that subcommands can only be launched by entering
an integer identifier from 1 through 8.

A "hidden" feature is that any string can be entered, and an anchored
regex search is used to find the first matching option.

This patch makes this feature a little more obvious by highlighting the
first character of each subcommand (for example "patch" is displayed as
"[p]atch"). The mechanism for doing this is to add an optional third
element to the array defining each subcommand; if present, it will be
used for display purposes, while the actual name of the subcommand (the
first element) is still used for matching purposes.

Signed-off-by: Wincent Colaiuta <win@wincent.com>
---

And another thought: if the colorization for git-add--interactive goes
ahead, we could drop the square brackets used here in favor of underline
or boldface, if people find that more attractive.

 git-add--interactive.perl |   18 +++++++++---------
 1 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/git-add--interactive.perl b/git-add--interactive.perl
index 0317ad9..2b1c55a 100755
--- a/git-add--interactive.perl
+++ b/git-add--interactive.perl
@@ -179,7 +179,7 @@ sub list_and_choose {
 			my $print = $stuff[$i];
 			if (ref $print) {
 				if ((ref $print) eq 'ARRAY') {
-					$print = $print->[0];
+					$print = $print->[2] || $print->[0];
 				}
 				else {
 					$print = $print->{PRINT};
@@ -774,14 +774,14 @@ EOF
 }
 
 sub main_loop {
-	my @cmd = ([ 'status', \&status_cmd, ],
-		   [ 'update', \&update_cmd, ],
-		   [ 'revert', \&revert_cmd, ],
-		   [ 'add untracked', \&add_untracked_cmd, ],
-		   [ 'patch', \&patch_update_cmd, ],
-		   [ 'diff', \&diff_cmd, ],
-		   [ 'quit', \&quit_cmd, ],
-		   [ 'help', \&help_cmd, ],
+	my @cmd = ([ 'status', \&status_cmd, '[s]tatus', ],
+		   [ 'update', \&update_cmd, '[u]date', ],
+		   [ 'revert', \&revert_cmd, '[r]evert', ],
+		   [ 'add untracked', \&add_untracked_cmd, '[a]dd untracked', ],
+		   [ 'patch', \&patch_update_cmd, '[p]atch', ],
+		   [ 'diff', \&diff_cmd, '[d]iff', ],
+		   [ 'quit', \&quit_cmd, '[q]uit', ],
+		   [ 'help', \&help_cmd, '[h]elp', ],
 	);
 	while (1) {
 		my ($it) = list_and_choose({ PROMPT => 'What now',
-- 
1.5.3.6.866.g67e44

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* Re: [PATCH] Highlight keyboard shortcuts in git-add--interactive
  2007-11-21 14:27 [PATCH] Highlight keyboard shortcuts in git-add--interactive Wincent Colaiuta
@ 2007-11-21 14:32 ` Matthieu Moy
  2007-11-21 15:28 ` Jeff King
  2007-11-28 23:56 ` Junio C Hamano
  2 siblings, 0 replies; 17+ messages in thread
From: Matthieu Moy @ 2007-11-21 14:32 UTC (permalink / raw)
  To: Wincent Colaiuta; +Cc: git, gitster

Wincent Colaiuta <win@wincent.com> writes:

> +		   [ 'update', \&update_cmd, '[u]date', ],
                                                 ^
"p" missing in "update".

-- 
Matthieu

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH] Highlight keyboard shortcuts in git-add--interactive
  2007-11-21 14:27 [PATCH] Highlight keyboard shortcuts in git-add--interactive Wincent Colaiuta
  2007-11-21 14:32 ` Matthieu Moy
@ 2007-11-21 15:28 ` Jeff King
  2007-11-21 23:00   ` Dan Zwell
  2007-11-28 23:56 ` Junio C Hamano
  2 siblings, 1 reply; 17+ messages in thread
From: Jeff King @ 2007-11-21 15:28 UTC (permalink / raw)
  To: Wincent Colaiuta; +Cc: Dan Zwell, git, gitster

On Wed, Nov 21, 2007 at 03:27:58PM +0100, Wincent Colaiuta wrote:

> The user interface provided by the command loop in git-add--interactive
> gives the impression that subcommands can only be launched by entering
> an integer identifier from 1 through 8.
> 
> A "hidden" feature is that any string can be entered, and an anchored
> regex search is used to find the first matching option.
> 
> This patch makes this feature a little more obvious by highlighting the
> first character of each subcommand (for example "patch" is displayed as
> "[p]atch"). The mechanism for doing this is to add an optional third

I think this is reasonable. It is also a candidate for colorization in
Dan Zwell's patches. Dan, any progress on the next revision of the patch
series?

-Peff

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH] Highlight keyboard shortcuts in git-add--interactive
  2007-11-21 15:28 ` Jeff King
@ 2007-11-21 23:00   ` Dan Zwell
  0 siblings, 0 replies; 17+ messages in thread
From: Dan Zwell @ 2007-11-21 23:00 UTC (permalink / raw)
  To: Jeff King; +Cc: Wincent Colaiuta, Dan Zwell, git, gitster

Jeff King wrote:
 > Dan, any progress on the next revision of the patch
 > series?
 >

Yeah, I've been busy with school work, but Thanksgiving break has just 
started. I hope to have something to send tonight, though it probably 
will not be the final draft, as it has quite a bit of changes from the 
last version.

Dan

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH] Highlight keyboard shortcuts in git-add--interactive
  2007-11-21 14:27 [PATCH] Highlight keyboard shortcuts in git-add--interactive Wincent Colaiuta
  2007-11-21 14:32 ` Matthieu Moy
  2007-11-21 15:28 ` Jeff King
@ 2007-11-28 23:56 ` Junio C Hamano
  2007-11-29  1:08   ` Wincent Colaiuta
  2007-11-29 12:00   ` Wincent Colaiuta
  2 siblings, 2 replies; 17+ messages in thread
From: Junio C Hamano @ 2007-11-28 23:56 UTC (permalink / raw)
  To: Wincent Colaiuta; +Cc: git

Wincent Colaiuta <win@wincent.com> writes:

> @@ -774,14 +774,14 @@ EOF
>  }
>  
>  sub main_loop {
> -	my @cmd = ([ 'status', \&status_cmd, ],
> -		   [ 'update', \&update_cmd, ],
> -		   [ 'revert', \&revert_cmd, ],
> -		   [ 'add untracked', \&add_untracked_cmd, ],
> -		   [ 'patch', \&patch_update_cmd, ],
> -		   [ 'diff', \&diff_cmd, ],
> -		   [ 'quit', \&quit_cmd, ],
> -		   [ 'help', \&help_cmd, ],
> +	my @cmd = ([ 'status', \&status_cmd, '[s]tatus', ],
> +		   [ 'update', \&update_cmd, '[u]date', ],
> +		   [ 'revert', \&revert_cmd, '[r]evert', ],
> +		   [ 'add untracked', \&add_untracked_cmd, '[a]dd untracked', ],
> +		   [ 'patch', \&patch_update_cmd, '[p]atch', ],
> +		   [ 'diff', \&diff_cmd, '[d]iff', ],
> +		   [ 'quit', \&quit_cmd, '[q]uit', ],
> +		   [ 'help', \&help_cmd, '[h]elp', ],
>  	);

I like the general idea of making it more obvious that you can use the
unique prefix, but I think you should make list_and_choose do this
automatically without adding a redundant element in the command array.

If you do so, the same highlighting will automatically appear when you
are picking which paths to update in the update subcommand, for example.

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH] Highlight keyboard shortcuts in git-add--interactive
  2007-11-28 23:56 ` Junio C Hamano
@ 2007-11-29  1:08   ` Wincent Colaiuta
  2007-11-29 12:00   ` Wincent Colaiuta
  1 sibling, 0 replies; 17+ messages in thread
From: Wincent Colaiuta @ 2007-11-29  1:08 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git

El 29/11/2007, a las 0:56, Junio C Hamano escribió:

> Wincent Colaiuta <win@wincent.com> writes:
>
>> @@ -774,14 +774,14 @@ EOF
>> }
>>
>> sub main_loop {
>> -	my @cmd = ([ 'status', \&status_cmd, ],
>> -		   [ 'update', \&update_cmd, ],
>> -		   [ 'revert', \&revert_cmd, ],
>> -		   [ 'add untracked', \&add_untracked_cmd, ],
>> -		   [ 'patch', \&patch_update_cmd, ],
>> -		   [ 'diff', \&diff_cmd, ],
>> -		   [ 'quit', \&quit_cmd, ],
>> -		   [ 'help', \&help_cmd, ],
>> +	my @cmd = ([ 'status', \&status_cmd, '[s]tatus', ],
>> +		   [ 'update', \&update_cmd, '[u]date', ],
>> +		   [ 'revert', \&revert_cmd, '[r]evert', ],
>> +		   [ 'add untracked', \&add_untracked_cmd, '[a]dd untracked', ],
>> +		   [ 'patch', \&patch_update_cmd, '[p]atch', ],
>> +		   [ 'diff', \&diff_cmd, '[d]iff', ],
>> +		   [ 'quit', \&quit_cmd, '[q]uit', ],
>> +		   [ 'help', \&help_cmd, '[h]elp', ],
>> 	);
>
> I like the general idea of making it more obvious that you can use the
> unique prefix, but I think you should make list_and_choose do this
> automatically without adding a redundant element in the command array.
>
> If you do so, the same highlighting will automatically appear when you
> are picking which paths to update in the update subcommand, for  
> example.


Yes, I did consider that, and it's very easy when all the options have  
a unique, single-letter prefix, as is the case with the main command  
loop. But what to do if you've got a bunch of paths with lengthy  
common prefixes? eg. what would you highlight here?

lib/ssl/crypto/foo.c
lib/ssl/crypto/bar.c
lib/ssl/crypto/baz.c

Highlighting "lib/ssl/crypto/f", "lib/ssl/crypto/bar" and "lib/ssl/ 
crypto/baz" doesn't sound like much help... Maybe there should be some  
limit: if you need to go more than 3 characters deep in order to  
differentiate unique prefixes then perhaps highlighting should be  
omitted in that case. What do you think of that idea?

Cheers,
Wincent

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [PATCH] Highlight keyboard shortcuts in git-add--interactive
  2007-11-28 23:56 ` Junio C Hamano
  2007-11-29  1:08   ` Wincent Colaiuta
@ 2007-11-29 12:00   ` Wincent Colaiuta
  2007-11-29 14:51     ` Jeff King
  2007-12-01  2:36     ` Junio C Hamano
  1 sibling, 2 replies; 17+ messages in thread
From: Wincent Colaiuta @ 2007-11-29 12:00 UTC (permalink / raw)
  To: git; +Cc: gitster, dzwell, peff, Matthieu.Moy, Wincent Colaiuta

The user interface provided by the command loop in git-add--interactive
gives the impression that subcommands can only be launched by entering
an integer identifier from 1 through 8.

A "hidden" feature is that any string can be entered, and an anchored
regex search is used to find the first matching option.

This patch makes this feature a little more obvious by highlighting the
first character of each subcommand (for example "patch" is displayed as
"[p]atch").

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.

In the case where the common prefix may be unreasonably large
highlighting is omitted; in this patch the soft limit (above which the
highlighting will be omitted for a particular item) is 0 (in other words,
there is no soft limit) and the hard limit (above which highlighting will
be omitted for all items) is 3, but this can be tweaked.

The actual highlighting is done by the highlight_prefix function, which
will enable us to implement ANSI color code-based highlighting (most
likely using underline or boldface) in the future.

Signed-off-by: Wincent Colaiuta <win@wincent.com>
---
 git-add--interactive.perl |   87 ++++++++++++++++++++++++++++++++++++++++++---
 1 files changed, 82 insertions(+), 5 deletions(-)

diff --git a/git-add--interactive.perl b/git-add--interactive.perl
index fb1e92a..6e5781b 100755
--- a/git-add--interactive.perl
+++ b/git-add--interactive.perl
@@ -44,7 +44,6 @@ my $status_fmt = '%12s %12s %s';
 my $status_head = sprintf($status_fmt, 'staged', 'unstaged', 'path');
 
 # Returns list of hashes, contents of each of which are:
-# PRINT:	print message
 # VALUE:	pathname
 # BINARY:	is a binary path
 # INDEX:	is index different from HEAD?
@@ -122,8 +121,6 @@ sub list_modified {
 		}
 		push @return, +{
 			VALUE => $_,
-			PRINT => (sprintf $status_fmt,
-				  $it->{INDEX}, $it->{FILE}, $_),
 			%$it,
 		};
 	}
@@ -159,10 +156,82 @@ sub find_unique {
 	return $found;
 }
 
+# inserts string into trie and updates count for each character
+sub update_trie {
+	my ($trie, $string) = @_;
+	foreach (split //, $string) {
+		$trie = $trie->{$_} ||= {COUNT => 0};
+		$trie->{COUNT}++;
+	}
+}
+
+# returns an array of tuples (prefix, remainder)
+sub find_unique_prefixes {
+	my @stuff = @_;
+	my @return = ();
+
+	# any single prefix exceeding the soft limit is omitted
+	# if any prefix exceeds the hard limit all are omitted
+	# 0 indicates no limit
+	my $soft_limit = 0;
+	my $hard_limit = 3;
+
+	# build a trie modelling all possible options
+	my %trie;
+	foreach my $print (@stuff) {
+		if ((ref $print) eq 'ARRAY') {
+			$print = $print->[0];
+		}
+		else {
+			$print = $print->{VALUE};
+		}
+		update_trie(\%trie, $print);
+		push @return, $print;
+	}
+
+	# use the trie to find the unique prefixes
+	for (my $i = 0; $i < @return; $i++) {
+		my $ret = $return[$i];
+		my @letters = split //, $ret;
+		my %search = %trie;
+		my ($prefix, $remainder);
+		my $j;
+		for ($j = 0; $j < @letters; $j++) {
+			my $letter = $letters[$j];
+			if ($search{$letter}{COUNT} == 1) {
+				$prefix = substr $ret, 0, $j + 1;
+				$remainder = substr $ret, $j + 1;
+				last;
+			}
+			else {
+				my $prefix = substr $ret, 0, $j;
+				return ()
+				    if ($hard_limit && $j + 1 > $hard_limit);
+			}
+			%search = %{$search{$letter}};
+		}
+		if ($soft_limit && $j + 1 > $soft_limit) {
+			$prefix = undef;
+			$remainder = $ret;
+		}
+		$return[$i] = [$prefix, $remainder];
+	}
+	return @return;
+}
+
+# given a prefix/remainder tuple return a string with the prefix highlighted
+# for now use square brackets; later might use ANSI colors (underline, bold)
+sub highlight_prefix {
+	my $prefix = shift;
+	my $remainder = shift;
+	$prefix ? "[$prefix]$remainder" : $remainder;
+}
+
 sub list_and_choose {
 	my ($opts, @stuff) = @_;
 	my (@chosen, @return);
 	my $i;
+	my @prefixes = find_unique_prefixes(@stuff) unless $opts->{LIST_ONLY};
 
       TOPLOOP:
 	while (1) {
@@ -179,10 +248,18 @@ sub list_and_choose {
 			my $print = $stuff[$i];
 			if (ref $print) {
 				if ((ref $print) eq 'ARRAY') {
-					$print = $print->[0];
+					$print = @prefixes ?
+					    highlight_prefix(@{$prefixes[$i]}) :
+					    $print->[0];
 				}
 				else {
-					$print = $print->{PRINT};
+					my $value = @prefixes ?
+					    highlight_prefix(@{$prefixes[$i]}) :
+					    $print->{VALUE};
+					$print = sprintf($status_fmt,
+					    $print->{INDEX},
+					    $print->{FILE},
+					    $value);
 				}
 			}
 			printf("%s%2d: %s", $chosen, $i+1, $print);
-- 
1.5.3.6.953.gdffc

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* Re: [PATCH] Highlight keyboard shortcuts in git-add--interactive
  2007-11-29 12:00   ` Wincent Colaiuta
@ 2007-11-29 14:51     ` Jeff King
  2007-12-01  2:36     ` Junio C Hamano
  1 sibling, 0 replies; 17+ messages in thread
From: Jeff King @ 2007-11-29 14:51 UTC (permalink / raw)
  To: Wincent Colaiuta; +Cc: git, gitster, dzwell, Matthieu.Moy

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 <peff@peff.net>

> +# 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

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH] Highlight keyboard shortcuts in git-add--interactive
  2007-11-29 12:00   ` Wincent Colaiuta
  2007-11-29 14:51     ` Jeff King
@ 2007-12-01  2:36     ` Junio C Hamano
  2007-12-01 13:58       ` Wincent Colaiuta
                         ` (2 more replies)
  1 sibling, 3 replies; 17+ messages in thread
From: Junio C Hamano @ 2007-12-01  2:36 UTC (permalink / raw)
  To: Wincent Colaiuta; +Cc: git, dzwell, peff, Matthieu.Moy

Wincent Colaiuta <win@wincent.com> writes:

> A "hidden" feature is that any string can be entered, and an anchored
> regex search is used to find the first matching option.

I'd run s/the first/the uniquely/ here.

When list_and_choose() function is letting you choose more than one
items, its prompt becomes ">> ", instead of "> " that is used for a
singleton choice.  To that prompt, you can say "3-7" (Add these 5 items
to the choice), "*" (I want all of them), "-2-4" (exclude 2 and 3 and 4
from the set I have chosen so far).  These are also "hidden", and need
to be documented, but that would be a separate patch.

> +# given a prefix/remainder tuple return a string with the prefix highlighted
> +# for now use square brackets; later might use ANSI colors (underline, bold)
> +sub highlight_prefix {
> +	my $prefix = shift;
> +	my $remainder = shift;
> +	$prefix ? "[$prefix]$remainder" : $remainder;
> +}

I'd rewrite the last line to:

	return (defined $prefix) ? "[$prefix]$remainder" : $remainder;

just in case the unique prefix is "0".  Otherwise you would lose the
first letter from "00ReadMe" and show remainder "0ReadMe" alone.

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH] Highlight keyboard shortcuts in git-add--interactive
  2007-12-01  2:36     ` Junio C Hamano
@ 2007-12-01 13:58       ` Wincent Colaiuta
  2007-12-01 14:07       ` [PATCH 1/2] " Wincent Colaiuta
  2007-12-02 14:11       ` [PATCH] " Wincent Colaiuta
  2 siblings, 0 replies; 17+ messages in thread
From: Wincent Colaiuta @ 2007-12-01 13:58 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git, dzwell, peff, Matthieu.Moy


El 1/12/2007, a las 3:36, Junio C Hamano escribió:

> Wincent Colaiuta <win@wincent.com> writes:
>
>> A "hidden" feature is that any string can be entered, and an anchored
>> regex search is used to find the first matching option.
>
> I'd run s/the first/the uniquely/ here.
>
> When list_and_choose() function is letting you choose more than one
> items, its prompt becomes ">> ", instead of "> " that is used for a
> singleton choice.  To that prompt, you can say "3-7" (Add these 5  
> items
> to the choice), "*" (I want all of them), "-2-4" (exclude 2 and 3  
> and 4
> from the set I have chosen so far).  These are also "hidden", and need
> to be documented, but that would be a separate patch.

Agreed that it belongs in a separate patch.

But I'm glad you brought this up as it reminds me of the need to watch  
out for those characters which have special meaning for  
list_and_choose().

> I'd rewrite the last line to:
>
> 	return (defined $prefix) ? "[$prefix]$remainder" : $remainder;
>
> just in case the unique prefix is "0".  Otherwise you would lose the
> first letter from "00ReadMe" and show remainder "0ReadMe" alone.

Excellent catch. Crazy old perl; I didn't realize that "0" (the  
string, not the number) would evaluate to false.

Will send a separate mail with a revised, squashed patch with these  
changes:

- "s/the first/the uniquely/" in the commit message as you suggest

- filter out prefixes which contain characters with special meaning  
for list_and_choose()

- check "defined $prefix" rather than just "$prefix"

- also fixes a problem discovered while playing with this; it didn't  
play nicely with untracked files

Cheers,
Wincent

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [PATCH 1/2] Highlight keyboard shortcuts in git-add--interactive
  2007-12-01  2:36     ` Junio C Hamano
  2007-12-01 13:58       ` Wincent Colaiuta
@ 2007-12-01 14:07       ` Wincent Colaiuta
  2007-12-01 14:07         ` [PATCH 2/2] Teach git-add--interactive to highlight untracked file prefixes Wincent Colaiuta
  2007-12-01 14:15         ` [PATCH 1/2] Highlight keyboard shortcuts in git-add--interactive Wincent Colaiuta
  2007-12-02 14:11       ` [PATCH] " Wincent Colaiuta
  2 siblings, 2 replies; 17+ messages in thread
From: Wincent Colaiuta @ 2007-12-01 14:07 UTC (permalink / raw)
  To: git; +Cc: gitster, dzwell, peff, Matthieu.Moy, Wincent Colaiuta

The user interface provided by the command loop in git-add--interactive
gives the impression that subcommands can only be launched by entering
an integer identifier from 1 through 8.

A "hidden" feature is that any string can be entered, and an anchored
regex search is used to find the uniquely matching option.

This patch makes this feature a little more obvious by highlighting the
first character of each subcommand (for example "patch" is displayed as
"[p]atch").

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.

In the case where the common prefix may be unreasonably large
highlighting is omitted; in this patch the soft limit (above which the
highlighting will be omitted for a particular item) is 0 (in other words,
there is no soft limit) and the hard limit (above which highlighting will
be omitted for all items) is 3, but this can be tweaked.

The actual highlighting is done by the highlight_prefix function, which
will enable us to implement ANSI color code-based highlighting (most
likely using underline or boldface) in the future.

Signed-off-by: Wincent Colaiuta <win@wincent.com>
---

Three things to note:

1. I don't actually find the "[p]atch" highlighting using brackets all
that attractive, especially when highlighting paths. This is
especially true when the common prefix is lengthy. This is why I've
set the "hard limit" to a very low 3 in this patch. I am basically
waiting on the stalled "color" series; once that's in "next" then I'd
like to switch to a highlight style that uses underlining.

2. The follow-up patch tweaks this so that the "Add untracked"
subcommand can benefit from it as well. Junio, you might want to squash
the two patches into one seeing as the second patch just refactors
something in the first patch; but I wanted to send them to the list as
two separate patches, at least for the purposes of review, because they
really are two separate behaviours.

3. I tried to find the patch that Junio sent out earlier allowing
multiple selection in the "Patch" subcommand, to see how this interplays
with that, but I couldn't locate it.

 git-add--interactive.perl |   97 ++++++++++++++++++++++++++++++++++++++++++--
 1 files changed, 92 insertions(+), 5 deletions(-)

diff --git a/git-add--interactive.perl b/git-add--interactive.perl
index fb1e92a..0fb808f 100755
--- a/git-add--interactive.perl
+++ b/git-add--interactive.perl
@@ -44,7 +44,6 @@ my $status_fmt = '%12s %12s %s';
 my $status_head = sprintf($status_fmt, 'staged', 'unstaged', 'path');
 
 # Returns list of hashes, contents of each of which are:
-# PRINT:	print message
 # VALUE:	pathname
 # BINARY:	is a binary path
 # INDEX:	is index different from HEAD?
@@ -122,8 +121,6 @@ sub list_modified {
 		}
 		push @return, +{
 			VALUE => $_,
-			PRINT => (sprintf $status_fmt,
-				  $it->{INDEX}, $it->{FILE}, $_),
 			%$it,
 		};
 	}
@@ -159,10 +156,92 @@ sub find_unique {
 	return $found;
 }
 
+# inserts string into trie and updates count for each character
+sub update_trie {
+	my ($trie, $string) = @_;
+	foreach (split //, $string) {
+		$trie = $trie->{$_} ||= {COUNT => 0};
+		$trie->{COUNT}++;
+	}
+}
+
+# returns an array of tuples (prefix, remainder)
+sub find_unique_prefixes {
+	my @stuff = @_;
+	my @return = ();
+
+	# any single prefix exceeding the soft limit is omitted
+	# if any prefix exceeds the hard limit all are omitted
+	# 0 indicates no limit
+	my $soft_limit = 0;
+	my $hard_limit = 3;
+
+	# build a trie modelling all possible options
+	my %trie;
+	foreach my $print (@stuff) {
+		if ((ref $print) eq 'ARRAY') {
+			$print = $print->[0];
+		}
+		elsif ((ref $print) eq 'HASH') {
+			$print = $print->{VALUE};
+		}
+		update_trie(\%trie, $print);
+		push @return, $print;
+	}
+
+	# use the trie to find the unique prefixes
+	for (my $i = 0; $i < @return; $i++) {
+		my $ret = $return[$i];
+		my @letters = split //, $ret;
+		my %search = %trie;
+		my ($prefix, $remainder);
+		my $j;
+		for ($j = 0; $j < @letters; $j++) {
+			my $letter = $letters[$j];
+			if ($search{$letter}{COUNT} == 1) {
+				$prefix = substr $ret, 0, $j + 1;
+				$remainder = substr $ret, $j + 1;
+				last;
+			}
+			else {
+				my $prefix = substr $ret, 0, $j;
+				return ()
+				    if ($hard_limit && $j + 1 > $hard_limit);
+			}
+			%search = %{$search{$letter}};
+		}
+		if ($soft_limit && $j + 1 > $soft_limit) {
+			$prefix = undef;
+			$remainder = $ret;
+		}
+		$return[$i] = [$prefix, $remainder];
+	}
+	return @return;
+}
+
+# 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
+}
+
+# given a prefix/remainder tuple return a string with the prefix highlighted
+# for now use square brackets; later might use ANSI colors (underline, bold)
+sub highlight_prefix {
+	my $prefix = shift;
+	my $remainder = shift;
+	is_valid_prefix($prefix) ? "[$prefix]$remainder" : $remainder;
+}
+
 sub list_and_choose {
 	my ($opts, @stuff) = @_;
 	my (@chosen, @return);
 	my $i;
+	my @prefixes = find_unique_prefixes(@stuff) unless $opts->{LIST_ONLY};
 
       TOPLOOP:
 	while (1) {
@@ -179,10 +258,18 @@ sub list_and_choose {
 			my $print = $stuff[$i];
 			if (ref $print) {
 				if ((ref $print) eq 'ARRAY') {
-					$print = $print->[0];
+					$print = @prefixes ?
+					    highlight_prefix(@{$prefixes[$i]}) :
+					    $print->[0];
 				}
 				else {
-					$print = $print->{PRINT};
+					my $value = @prefixes ?
+					    highlight_prefix(@{$prefixes[$i]}) :
+					    $print->{VALUE};
+					$print = sprintf($status_fmt,
+					    $print->{INDEX},
+					    $print->{FILE},
+					    $value);
 				}
 			}
 			printf("%s%2d: %s", $chosen, $i+1, $print);
-- 
1.5.3.6.953.gdffc

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH 2/2] Teach git-add--interactive to highlight untracked file prefixes
  2007-12-01 14:07       ` [PATCH 1/2] " Wincent Colaiuta
@ 2007-12-01 14:07         ` Wincent Colaiuta
  2007-12-01 14:15         ` [PATCH 1/2] Highlight keyboard shortcuts in git-add--interactive Wincent Colaiuta
  1 sibling, 0 replies; 17+ messages in thread
From: Wincent Colaiuta @ 2007-12-01 14:07 UTC (permalink / raw)
  To: git; +Cc: gitster, dzwell, peff, Matthieu.Moy, Wincent Colaiuta

Tweak the list_and_choose function so that untracked files will
use the automatic prefix detection machinery.

This works because while previously we handled arrays (command
menus), hashes (patch subcommand) now we explicitly handle strings
(add untracked subcommand).

Signed-off-by: Wincent Colaiuta <win@wincent.com>
---
 git-add--interactive.perl |   30 +++++++++++++++---------------
 1 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/git-add--interactive.perl b/git-add--interactive.perl
index 0fb808f..a1aee21 100755
--- a/git-add--interactive.perl
+++ b/git-add--interactive.perl
@@ -256,21 +256,21 @@ sub list_and_choose {
 		for ($i = 0; $i < @stuff; $i++) {
 			my $chosen = $chosen[$i] ? '*' : ' ';
 			my $print = $stuff[$i];
-			if (ref $print) {
-				if ((ref $print) eq 'ARRAY') {
-					$print = @prefixes ?
-					    highlight_prefix(@{$prefixes[$i]}) :
-					    $print->[0];
-				}
-				else {
-					my $value = @prefixes ?
-					    highlight_prefix(@{$prefixes[$i]}) :
-					    $print->{VALUE};
-					$print = sprintf($status_fmt,
-					    $print->{INDEX},
-					    $print->{FILE},
-					    $value);
-				}
+			my $ref = ref $print;
+			my $highlighted = highlight_prefix(@{$prefixes[$i]})
+			    if @prefixes;
+			if ($ref eq 'ARRAY') {
+				$print = $highlighted || $print->[0];
+			}
+			elsif ($ref eq 'HASH') {
+				my $value = $highlighted || $print->{VALUE};
+				$print = sprintf($status_fmt,
+				    $print->{INDEX},
+				    $print->{FILE},
+				    $value);
+			}
+			else {
+				$print = $highlighted || $print;
 			}
 			printf("%s%2d: %s", $chosen, $i+1, $print);
 			if (($opts->{LIST_FLAT}) &&
-- 
1.5.3.6.953.gdffc

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* Re: [PATCH 1/2] Highlight keyboard shortcuts in git-add--interactive
  2007-12-01 14:07       ` [PATCH 1/2] " Wincent Colaiuta
  2007-12-01 14:07         ` [PATCH 2/2] Teach git-add--interactive to highlight untracked file prefixes Wincent Colaiuta
@ 2007-12-01 14:15         ` Wincent Colaiuta
  2007-12-01 14:29           ` [REPLACEMENT PATCH] " Wincent Colaiuta
  1 sibling, 1 reply; 17+ messages in thread
From: Wincent Colaiuta @ 2007-12-01 14:15 UTC (permalink / raw)
  To: Wincent Colaiuta; +Cc: git, gitster, dzwell, peff, Matthieu.Moy

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

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [REPLACEMENT PATCH] Highlight keyboard shortcuts in git-add--interactive
  2007-12-01 14:15         ` [PATCH 1/2] Highlight keyboard shortcuts in git-add--interactive Wincent Colaiuta
@ 2007-12-01 14:29           ` Wincent Colaiuta
  0 siblings, 0 replies; 17+ messages in thread
From: Wincent Colaiuta @ 2007-12-01 14:29 UTC (permalink / raw)
  To: git; +Cc: gitster, dzwell, peff, Matthieu.Moy, Wincent Colaiuta

The user interface provided by the command loop in git-add--interactive
gives the impression that subcommands can only be launched by entering
an integer identifier from 1 through 8.

A "hidden" feature is that any string can be entered, and an anchored
regex search is used to find the uniquely matching option.

This patch makes this feature a little more obvious by highlighting the
first character of each subcommand (for example "patch" is displayed as
"[p]atch").

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.

In the case where the common prefix may be unreasonably large
highlighting is omitted; in this patch the soft limit (above which the
highlighting will be omitted for a particular item) is 0 (in other words,
there is no soft limit) and the hard limit (above which highlighting will
be omitted for all items) is 3, but this can be tweaked.

The actual highlighting is done by the highlight_prefix function, which
will enable us to implement ANSI color code-based highlighting (most
likely using underline or boldface) in the future.

Signed-off-by: Wincent Colaiuta <win@wincent.com>
---

I will go now and crawl under a rock.

 git-add--interactive.perl |  110 ++++++++++++++++++++++++++++++++++++++++----
 1 files changed, 100 insertions(+), 10 deletions(-)

diff --git a/git-add--interactive.perl b/git-add--interactive.perl
index fb1e92a..0e358b5 100755
--- a/git-add--interactive.perl
+++ b/git-add--interactive.perl
@@ -44,7 +44,6 @@ my $status_fmt = '%12s %12s %s';
 my $status_head = sprintf($status_fmt, 'staged', 'unstaged', 'path');
 
 # Returns list of hashes, contents of each of which are:
-# PRINT:	print message
 # VALUE:	pathname
 # BINARY:	is a binary path
 # INDEX:	is index different from HEAD?
@@ -122,8 +121,6 @@ sub list_modified {
 		}
 		push @return, +{
 			VALUE => $_,
-			PRINT => (sprintf $status_fmt,
-				  $it->{INDEX}, $it->{FILE}, $_),
 			%$it,
 		};
 	}
@@ -159,10 +156,95 @@ sub find_unique {
 	return $found;
 }
 
+# inserts string into trie and updates count for each character
+sub update_trie {
+	my ($trie, $string) = @_;
+	foreach (split //, $string) {
+		$trie = $trie->{$_} ||= {COUNT => 0};
+		$trie->{COUNT}++;
+	}
+}
+
+# returns an array of tuples (prefix, remainder)
+sub find_unique_prefixes {
+	my @stuff = @_;
+	my @return = ();
+
+	# any single prefix exceeding the soft limit is omitted
+	# if any prefix exceeds the hard limit all are omitted
+	# 0 indicates no limit
+	my $soft_limit = 0;
+	my $hard_limit = 3;
+
+	# build a trie modelling all possible options
+	my %trie;
+	foreach my $print (@stuff) {
+		if ((ref $print) eq 'ARRAY') {
+			$print = $print->[0];
+		}
+		elsif ((ref $print) eq 'HASH') {
+			$print = $print->{VALUE};
+		}
+		update_trie(\%trie, $print);
+		push @return, $print;
+	}
+
+	# use the trie to find the unique prefixes
+	for (my $i = 0; $i < @return; $i++) {
+		my $ret = $return[$i];
+		my @letters = split //, $ret;
+		my %search = %trie;
+		my ($prefix, $remainder);
+		my $j;
+		for ($j = 0; $j < @letters; $j++) {
+			my $letter = $letters[$j];
+			if ($search{$letter}{COUNT} == 1) {
+				$prefix = substr $ret, 0, $j + 1;
+				$remainder = substr $ret, $j + 1;
+				last;
+			}
+			else {
+				my $prefix = substr $ret, 0, $j;
+				return ()
+				    if ($hard_limit && $j + 1 > $hard_limit);
+			}
+			%search = %{$search{$letter}};
+		}
+		if ($soft_limit && $j + 1 > $soft_limit) {
+			$prefix = undef;
+			$remainder = $ret;
+		}
+		$return[$i] = [$prefix, $remainder];
+	}
+	return @return;
+}
+
+# filters out prefixes which have special meaning to list_and_choose()
+sub is_valid_prefix {
+	my $prefix = shift;
+	return (defined $prefix) &&
+	    !($prefix =~ /[\s,]/) && # separators
+	    !($prefix =~ /^-/) &&    # deselection
+	    !($prefix =~ /^\d+/) &&  # selection
+	    ($prefix ne '*');        # "all" wildcard
+}
+
+# given a prefix/remainder tuple return a string with the prefix highlighted
+# for now use square brackets; later might use ANSI colors (underline, bold)
+sub highlight_prefix {
+	my $prefix = shift;
+	my $remainder = shift;
+	return $remainder unless defined $prefix;
+	return is_valid_prefix($prefix) ?
+	    "[$prefix]$remainder" :
+	    "$prefix$remainder";
+}
+
 sub list_and_choose {
 	my ($opts, @stuff) = @_;
 	my (@chosen, @return);
 	my $i;
+	my @prefixes = find_unique_prefixes(@stuff) unless $opts->{LIST_ONLY};
 
       TOPLOOP:
 	while (1) {
@@ -177,13 +259,21 @@ sub list_and_choose {
 		for ($i = 0; $i < @stuff; $i++) {
 			my $chosen = $chosen[$i] ? '*' : ' ';
 			my $print = $stuff[$i];
-			if (ref $print) {
-				if ((ref $print) eq 'ARRAY') {
-					$print = $print->[0];
-				}
-				else {
-					$print = $print->{PRINT};
-				}
+			my $ref = ref $print;
+			my $highlighted = highlight_prefix(@{$prefixes[$i]})
+			    if @prefixes;
+			if ($ref eq 'ARRAY') {
+				$print = $highlighted || $print->[0];
+			}
+			elsif ($ref eq 'HASH') {
+				my $value = $highlighted || $print->{VALUE};
+				$print = sprintf($status_fmt,
+				    $print->{INDEX},
+				    $print->{FILE},
+				    $value);
+			}
+			else {
+				$print = $highlighted || $print;
 			}
 			printf("%s%2d: %s", $chosen, $i+1, $print);
 			if (($opts->{LIST_FLAT}) &&
-- 
1.5.3.6.953.gdffc

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* Re: [PATCH] Highlight keyboard shortcuts in git-add--interactive
  2007-12-01  2:36     ` Junio C Hamano
  2007-12-01 13:58       ` Wincent Colaiuta
  2007-12-01 14:07       ` [PATCH 1/2] " Wincent Colaiuta
@ 2007-12-02 14:11       ` Wincent Colaiuta
  2007-12-02 19:06         ` Junio C Hamano
  2 siblings, 1 reply; 17+ messages in thread
From: Wincent Colaiuta @ 2007-12-02 14:11 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git, dzwell, peff, Matthieu.Moy

El 1/12/2007, a las 3:36, Junio C Hamano escribió:

> When list_and_choose() function is letting you choose more than one
> items, its prompt becomes ">> ", instead of "> " that is used for a
> singleton choice.  To that prompt, you can say "3-7" (Add these 5  
> items
> to the choice), "*" (I want all of them), "-2-4" (exclude 2 and 3  
> and 4
> from the set I have chosen so far).  These are also "hidden", and need
> to be documented, but that would be a separate patch.

I was just about to prepare some documentation for this when I saw  
that it is already documented, and by none other than you, Junio! (see  
6a5ad23d).

Unless by "documentation" you meant to somehow expose these in the  
interface at runtime... something like this? (applied on top of the  
patch I just sent to the list):

diff --git a/git-add--interactive.perl b/git-add--interactive.perl
index 32fb9ea..e7b07ee 100755
--- a/git-add--interactive.perl
+++ b/git-add--interactive.perl
@@ -237,7 +237,8 @@ sub is_valid_prefix {
  	    !($prefix =~ /[\s,]/) && # separators
  	    !($prefix =~ /^-/) &&    # deselection
  	    !($prefix =~ /^\d+/) &&  # selection
-	    ($prefix ne '*');        # "all" wildcard
+	    ($prefix ne '*') &&      # "all" wildcard
+	    ($prefix ne '?');        # prompt help
  }

  # given a prefix/remainder tuple return a string with the prefix  
highlighted
@@ -308,7 +309,7 @@ sub list_and_choose {
  			print "> ";
  		}
  		else {
-			print ">> ";
+			print " (?)>> ";
  		}
  		my $line = <STDIN>;
  		if (!$line) {
@@ -318,6 +319,10 @@ sub list_and_choose {
  		}
  		chomp $line;
  		last if $line eq '';
+		if ($line eq '?' && !$opts->{SINGLETON}) {
+			prompt_help_cmd();
+			next TOPLOOP;
+		}
  		for my $choice (split(/[\s,]+/, $line)) {
  			my $choose = 1;
  			my ($bottom, $top);
@@ -363,6 +368,19 @@ sub list_and_choose {
  	return @return;
  }

+sub prompt_help_cmd {
+	print <<\EOF ;
+Prompt help:
+1          - select a single item
+3-5        - select a range of items
+2-3,6-9    - select multiple ranges
+foo        - select item based on unique prefix
+-...       - unselect specified items
+*          - choose all items
+           - (empty) finish selecting
+EOF
+}
+
  sub status_cmd {
  	list_and_choose({ LIST_ONLY => 1, HEADER => $status_head },
  			list_modified());


Cheers,
Wincent

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* Re: [PATCH] Highlight keyboard shortcuts in git-add--interactive
  2007-12-02 14:11       ` [PATCH] " Wincent Colaiuta
@ 2007-12-02 19:06         ` Junio C Hamano
  2007-12-03  8:09           ` Wincent Colaiuta
  0 siblings, 1 reply; 17+ messages in thread
From: Junio C Hamano @ 2007-12-02 19:06 UTC (permalink / raw)
  To: Wincent Colaiuta; +Cc: git, dzwell, peff, Matthieu.Moy

Wincent Colaiuta <win@wincent.com> writes:

> Unless by "documentation" you meant to somehow expose these in the  
> interface at runtime... something like this? (applied on top of the  
> patch I just sent to the list):

I did not recall (and was too lazy to check) if they were documented
already, but as you suggest, I think letting people type ? at the prompt
to get a help is always a good idea.  So, instead of doing this part:

> @@ -308,7 +309,7 @@ sub list_and_choose {
>   			print "> ";
>   		}
>   		else {
> -			print ">> ";
> +			print " (?)>> ";

I'd prefer accepting '?'  as a valid "help me" input and showing
appropriate help for _both_ singleton select and multiple select,
without mentioning " (?)".  For this, your prompt_help_cmd needs to be
enhanced to limit the help to singleton case, though.

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH] Highlight keyboard shortcuts in git-add--interactive
  2007-12-02 19:06         ` Junio C Hamano
@ 2007-12-03  8:09           ` Wincent Colaiuta
  0 siblings, 0 replies; 17+ messages in thread
From: Wincent Colaiuta @ 2007-12-03  8:09 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git, dzwell, peff, Matthieu.Moy

El 2/12/2007, a las 20:06, Junio C Hamano escribió:

> Wincent Colaiuta <win@wincent.com> writes:
>
>> Unless by "documentation" you meant to somehow expose these in the
>> interface at runtime... something like this? (applied on top of the
>> patch I just sent to the list):
>
> I did not recall (and was too lazy to check) if they were documented
> already, but as you suggest, I think letting people type ? at the  
> prompt
> to get a help is always a good idea.  So, instead of doing this part:
>
>> @@ -308,7 +309,7 @@ sub list_and_choose {
>>  			print "> ";
>>  		}
>>  		else {
>> -			print ">> ";
>> +			print " (?)>> ";
>
> I'd prefer accepting '?'  as a valid "help me" input and showing
> appropriate help for _both_ singleton select and multiple select,
> without mentioning " (?)".  For this, your prompt_help_cmd needs to be
> enhanced to limit the help to singleton case, though.


That's actually the way I did it the first time, but then decided that  
the singleton prompt help had so little to say that I doubted about  
including it. Something like this, once again on top of the patch I  
posted yesterday ("Fixes for automatic prefix highlighting"):

diff --git a/git-add--interactive.perl b/git-add--interactive.perl
index 32fb9ea..335c2c6 100755
--- a/git-add--interactive.perl
+++ b/git-add--interactive.perl
@@ -237,7 +237,8 @@ sub is_valid_prefix {
  	    !($prefix =~ /[\s,]/) && # separators
  	    !($prefix =~ /^-/) &&    # deselection
  	    !($prefix =~ /^\d+/) &&  # selection
-	    ($prefix ne '*');        # "all" wildcard
+	    ($prefix ne '*') &&      # "all" wildcard
+	    ($prefix ne '?');        # prompt help
  }

  # given a prefix/remainder tuple return a string with the prefix  
highlighted
@@ -318,6 +319,12 @@ sub list_and_choose {
  		}
  		chomp $line;
  		last if $line eq '';
+		if ($line eq '?') {
+			$opts->{SINGLETON} ?
+			    singleton_prompt_help_cmd() :
+			    prompt_help_cmd();
+			next TOPLOOP;
+		}
  		for my $choice (split(/[\s,]+/, $line)) {
  			my $choose = 1;
  			my ($bottom, $top);
@@ -363,6 +370,28 @@ sub list_and_choose {
  	return @return;
  }

+sub singleton_prompt_help_cmd {
+	print <<\EOF ;
+Prompt help:
+1          - select a numbered item
+foo        - select item based on unique prefix
+           - (empty) select nothing
+EOF
+}
+
+sub prompt_help_cmd {
+	print <<\EOF ;
+Prompt help:
+1          - select a single item
+3-5        - select a range of items
+2-3,6-9    - select multiple ranges
+foo        - select item based on unique prefix
+-...       - unselect specified items
+*          - choose all items
+           - (empty) finish selecting
+EOF
+}
+
  sub status_cmd {
  	list_and_choose({ LIST_ONLY => 1, HEADER => $status_head },
  			list_modified());



Cheers,
Wincent

^ permalink raw reply related	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2007-12-03  8:10 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-21 14:27 [PATCH] Highlight keyboard shortcuts in git-add--interactive Wincent Colaiuta
2007-11-21 14:32 ` Matthieu Moy
2007-11-21 15:28 ` Jeff King
2007-11-21 23:00   ` Dan Zwell
2007-11-28 23:56 ` Junio C Hamano
2007-11-29  1:08   ` Wincent Colaiuta
2007-11-29 12:00   ` Wincent Colaiuta
2007-11-29 14:51     ` Jeff King
2007-12-01  2:36     ` Junio C Hamano
2007-12-01 13:58       ` Wincent Colaiuta
2007-12-01 14:07       ` [PATCH 1/2] " Wincent Colaiuta
2007-12-01 14:07         ` [PATCH 2/2] Teach git-add--interactive to highlight untracked file prefixes Wincent Colaiuta
2007-12-01 14:15         ` [PATCH 1/2] Highlight keyboard shortcuts in git-add--interactive Wincent Colaiuta
2007-12-01 14:29           ` [REPLACEMENT PATCH] " Wincent Colaiuta
2007-12-02 14:11       ` [PATCH] " Wincent Colaiuta
2007-12-02 19:06         ` Junio C Hamano
2007-12-03  8:09           ` Wincent Colaiuta

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).