[PATCH] Print hunk number in prompt of add --patch.
- From
William Pursell <bill.pursell@gmail.com>
- Date
- Nov 27, 2008, 06:17 UTC
- Message-ID
- <492E3B6D.9090309@gmail.com>
I'm considering adding a command to skip to a hunk, and just generally find myself confused about which hunk I'm looking at, so having the number in the prompt is helpful.
Signed-off-by: William Pursell <bill.pursell@gmail.com> --- git-add--interactive.perl | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/git-add--interactive.perl b/git-add--interactive.perl index b0223c3..7974cd1 100755 --- a/git-add--interactive.perl +++ b/git-add--interactive.perl @@ -919,7 +919,7 @@ sub patch_update_file { for (@{$hunk[$ix]{DISPLAY}}) { print; } - print colored $prompt_color, "Stage this hunk [y/n/a/d$other/?]? "; + print colored $prompt_color, "Stage hunk $ix [y/n/a/d$other/?]? "; my $line = <STDIN>; if ($line) { if ($line =~ /^y/i) {
-- 1.6.0.4.782.geea74.dirty -- William Pursell