Skip to content

Commit

Permalink
git-commit: use update-index --stdin, instead of xargs.
Browse files Browse the repository at this point in the history
Now update-index supports '-z --stdin', we do not have to rely on
platform xargs to support -0 option.

Signed-off-by: Junio C Hamano <junkio@cox.net>
  • Loading branch information
Junio C Hamano committed Sep 27, 2005
1 parent 1f7f99d commit 148ccbb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions git-commit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -94,13 +94,13 @@ esac
case "$all,$#" in
t,*)
git-diff-files --name-only -z |
xargs -0 git-update-index -q --remove --
git-update-index --remove -z --stdin
;;
,0)
;;
*)
git-diff-files --name-only -z "$@" |
xargs -0 git-update-index -q --remove --
git-update-index --remove -z --stdin
;;
esac || exit 1
git-update-index -q --refresh || exit 1
Expand Down

0 comments on commit 148ccbb

Please sign in to comment.