Browse Source

Remove use of 'xargs -0' from git-reset.

Even without the trouble it causes to people without GNU xargs,
it was not really necessary to print from Perl and then remove it
outside.  Just unlink it inside Perl.

Signed-off-by: Junio C Hamano <junkio@cox.net>
maint
Junio C Hamano 20 years ago
parent
commit
c3bc895c81
  1. 6
      git-reset.sh

6
git-reset.sh

@ -81,10 +81,12 @@ case "$reset_type" in @@ -81,10 +81,12 @@ case "$reset_type" in
while (<$fh>) {
chomp;
if (! exists $keep{$_}) {
print "$_\0";
# it is ok if this fails -- it may already
# have been culled by checkout-index.
unlink $_;
}
}
' $tmp-exists | xargs -0 rm -f --
' $tmp-exists
;;
--soft )
;; # Nothing else to do

Loading…
Cancel
Save