From: Junio C Hamano Date: Sat, 24 Sep 2005 22:02:35 +0000 (-0700) Subject: Remove use of 'xargs -0' from git-reset. X-Git-Tag: v0.99.8~65 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=c3bc895c81b6ec6906be7e6739edb4a50eecf6e9;p=git.git 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 --- diff --git a/git-reset.sh b/git-reset.sh index e028ff65d..dfa9cb8bb 100755 --- a/git-reset.sh +++ b/git-reset.sh @@ -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