summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2005-09-24 22:02:35 (GMT)
committerJunio C Hamano <junkio@cox.net>2005-09-24 22:02:35 (GMT)
commitc3bc895c81b6ec6906be7e6739edb4a50eecf6e9 (patch)
treedc5e12f90f4ca0d0f041febbb94ee1533950ed71
parentd66189e2c937867e295aa348068b49498ae1b5ab (diff)
downloadgit-c3bc895c81b6ec6906be7e6739edb4a50eecf6e9.zip
git-c3bc895c81b6ec6906be7e6739edb4a50eecf6e9.tar.gz
git-c3bc895c81b6ec6906be7e6739edb4a50eecf6e9.tar.bz2
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>
-rwxr-xr-xgit-reset.sh6
1 files changed, 4 insertions, 2 deletions
diff --git a/git-reset.sh b/git-reset.sh
index e028ff6..dfa9cb8 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