Skip to content

Commit

Permalink
Merge branch 'kt/add-i-progress'
Browse files Browse the repository at this point in the history
"git add -i" has been taught to show the total number of hunks and
the hunks that has been processed so far when showing prompts.

* kt/add-i-progress:
  add -i: show progress counter in the prompt
  • Loading branch information
gitster committed Oct 11, 2019
2 parents 66102cf + 8085050 commit f0d407e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion git-add--interactive.perl
Original file line number Diff line number Diff line change
Expand Up @@ -1541,7 +1541,7 @@ sub patch_update_file {
for (@{$hunk[$ix]{DISPLAY}}) {
print;
}
print colored $prompt_color,
print colored $prompt_color, "(", ($ix+1), "/$num) ",
sprintf(__($patch_update_prompt_modes{$patch_mode}{$hunk[$ix]{TYPE}}), $other);

my $line = prompt_single_character;
Expand Down
2 changes: 1 addition & 1 deletion t/t3701-add-interactive.sh
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ test_expect_success C_LOCALE_OUTPUT 'add first line works' '
git commit -am "clear local changes" &&
git apply patch &&
printf "%s\n" s y y | git add -p file 2>error |
sed -n -e "s/^Stage this hunk[^@]*\(@@ .*\)/\1/" \
sed -n -e "s/^([1-2]\/[1-2]) Stage this hunk[^@]*\(@@ .*\)/\1/" \
-e "/^[-+@ \\\\]"/p >output &&
test_must_be_empty error &&
git diff --cached >diff &&
Expand Down

0 comments on commit f0d407e

Please sign in to comment.