Skip to content

Commit

Permalink
git-add -i: update removed path correctly.
Browse files Browse the repository at this point in the history
Earlier, when a path that was removed from the working tree was
chosen for update subcommand, you got an error like this:

    error: git-resolve.sh: does not exist and --remove not passed
    fatal: Unable to process file git-resolve.sh

Signed-off-by: Junio C Hamano <junkio@cox.net>
  • Loading branch information
Junio C Hamano committed Feb 7, 2007
1 parent fa1b4d2 commit a4f7112
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions git-add--interactive.perl
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#!/usr/bin/perl -w


use strict;

sub run_cmd_pipe {
Expand Down Expand Up @@ -282,7 +281,7 @@ sub update_cmd {
HEADER => $status_head, },
@mods);
if (@update) {
system(qw(git update-index --add --),
system(qw(git update-index --add --remove --),
map { $_->{VALUE} } @update);
say_n_paths('updated', @update);
}
Expand Down

0 comments on commit a4f7112

Please sign in to comment.