@matheusbsbs / matheus-bagliano / commits / a4f7112fde
Fork 0

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>

Junio C Hamano committed Feb 7, 2007 at 10:56 UTC a4f7112fdee6877af4595927858ff4550f2d9c07
1 file changed +1 -2
git-add--interactive.perl
+1 -2
@@ -1,6 +1,5 @@
1 #!/usr/bin/perl -w
2
3 -
3 use strict;
4
5 sub run_cmd_pipe {
@@ -282,7 +281,7 @@ sub update_cmd {
281 HEADER => $status_head, },
282 @mods);
283 if (@update) {
285 - system(qw(git update-index --add --),
284 + system(qw(git update-index --add --remove --),
285 map { $_->{VALUE} } @update);
286 say_n_paths('updated', @update);
287 }