From: Junio C Hamano Date: Wed, 7 Feb 2007 18:56:38 +0000 (-0800) Subject: git-add -i: update removed path correctly. X-Git-Tag: v1.5.0-rc4~3 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=a4f7112fdee6877af4595927858ff4550f2d9c07;p=git.git 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 --- diff --git a/git-add--interactive.perl b/git-add--interactive.perl index 0057f8658..dc3038091 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); }