From: "Tommy M. McGuire" <mcguire@crsr.net>
To: "Tommy M. McGuire" <mcguire@crsr.net>
Cc: Zack Brown <zbrown@tumblerings.org>, Petr Baudis <pasky@ucw.cz>,
git@vger.kernel.org
Subject: Re: cg-init bug -- identified
Date: Sun, 5 Jun 2005 14:09:38 -0500 [thread overview]
Message-ID: <20050605190938.GB21345@immutable.crsr.net> (raw)
In-Reply-To: <20050605184341.GA21345@immutable.crsr.net>
On Sun, Jun 05, 2005 at 01:43:41PM -0500, Tommy M. McGuire wrote:
> Adding file foo'prime
> xargs: unmatched single quote
> + cg-commit -C '-mInitial commit' -E
>
> The error is the second-to-last line. It partially succeeded originally
> because xargs broke off and handled parts of the input before reaching
> the single quote.
The bug is in cg-add, which doesn't use -print0 and -0.
--
Tommy McGuire
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
next prev parent reply other threads:[~2005-06-05 19:07 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-06-05 15:30 cg-init bug Zack Brown
2005-06-05 16:10 ` Radoslaw Szkodzinski
2005-06-05 16:27 ` Zack Brown
2005-06-05 17:59 ` Radoslaw Szkodzinski
2005-06-05 17:28 ` Petr Baudis
2005-06-05 17:56 ` Zack Brown
2005-06-05 18:10 ` Petr Baudis
2005-06-05 18:29 ` cg-init bug -- identified Zack Brown
2005-06-05 18:43 ` Tommy M. McGuire
2005-06-05 19:09 ` Tommy M. McGuire [this message]
2005-06-05 19:22 ` [PATCH] " Tommy M. McGuire
2005-06-05 19:15 ` [PATCH] Make cg-add use xargs -0 Dan Holmsand
2005-06-05 20:19 ` cg-init bug -- identified Petr Baudis
2005-06-05 23:52 ` cg-init bug -- identified and fixed - thanks! Zack Brown
2005-06-05 21:11 ` cg-init bug -- identified Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20050605190938.GB21345@immutable.crsr.net \
--to=mcguire@crsr.net \
--cc=git@vger.kernel.org \
--cc=pasky@ucw.cz \
--cc=zbrown@tumblerings.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).