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

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>

Junio C Hamano committed Sep 24, 2005 at 15:02 UTC c3bc895c81b6ec6906be7e6739edb4a50eecf6e9
1 file changed +4 -2
git-reset.sh
+4 -2
@@ -81,10 +81,12 @@ case "$reset_type" in
81 while (<$fh>) {
82 chomp;
83 if (! exists $keep{$_}) {
84 - print "$_\0";
84 + # it is ok if this fails -- it may already
85 + # have been culled by checkout-index.
86 + unlink $_;
87 }
88 }
87 - ' $tmp-exists | xargs -0 rm -f --
89 + ' $tmp-exists
90 ;;
91 --soft )
92 ;; # Nothing else to do