summaryrefslogtreecommitdiff
path: root/git-add--interactive.perl
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2007-02-07 18:56:38 (GMT)
committerJunio C Hamano <junkio@cox.net>2007-02-07 18:56:38 (GMT)
commita4f7112fdee6877af4595927858ff4550f2d9c07 (patch)
tree944cce39eac3d33e6f0f2ce3e57f8e7f8dc77b09 /git-add--interactive.perl
parentfa1b4d2ace9bbd7edbcbf9bd41f2cc4f7f6b616e (diff)
downloadgit-a4f7112fdee6877af4595927858ff4550f2d9c07.zip
git-a4f7112fdee6877af4595927858ff4550f2d9c07.tar.gz
git-a4f7112fdee6877af4595927858ff4550f2d9c07.tar.bz2
git-add -i: update removed path correctly.
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>
Diffstat (limited to 'git-add--interactive.perl')
-rwxr-xr-xgit-add--interactive.perl3
1 files changed, 1 insertions, 2 deletions
diff --git a/git-add--interactive.perl b/git-add--interactive.perl
index 0057f86..dc30380 100755
--- a/git-add--interactive.perl
+++ b/git-add--interactive.perl
@@ -1,6 +1,5 @@
#!/usr/bin/perl -w
-
use strict;
sub run_cmd_pipe {
@@ -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);
}