Subject: [PATCH] Re: cg-init bug -- identified

From: "Tommy M. McGuire" <[email-masked]>
Date: Sun, 5 Jun 2005 14:22:17 -0500

Ok, so cg-mkpatch is nifty.  (Note: slightly diferent patch to avoid
extra space when listing the files.)

-- 
Tommy McGuire
Use -print0 with find and -0 with xargs to avoid problems with quotes,
etc., in filenames.

---
commit b106726cd681a9cb26343191afc74ccca5d4e351
tree a674424eddc66e19cf806113c70fd80e81879dd1
parent ac9f200795352b9330dcf3c18298ce3b738c7024
author Tommy M. McGuire <[email-masked]> Sun, 05 Jun 2005 14:17:37 -0500
committer Tommy M. McGuire <[email-masked]> Sun, 05 Jun 2005 14:17:37 -0500

 cg-add |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/cg-add b/cg-add
--- a/cg-add
+++ b/cg-add
@@ -20,9 +20,9 @@ USAGE="cg-add FILE..."
 [ "$1" ] || usage
 
 TMPFILE=$(mktemp -t gitadd.XXXXXX)
-find "$@" -type f > $TMPFILE || die "not all files exist, nothing added"
+find "$@" -type f -print0 > $TMPFILE || die "not all files exist, nothing added"
 
-cat $TMPFILE | awk '{print "Adding file "  $0}'
-cat $TMPFILE | xargs git-update-cache --add --
+cat $TMPFILE | xargs -0l1 echo "Adding file"
+cat $TMPFILE | xargs -0 git-update-cache --add --
 
 rm $TMPFILE