From: Bryan Larsen <bryan.larsen@gmail.com>
To: Bryan Larsen <bryanlarsen@yahoo.com>
Cc: pasky@suse.cz, git@vger.kernel.org
Subject: Re: [PATCH] cg-commit chokes when given a very large list of files
Date: Sun, 17 Jul 2005 23:29:41 -0400 [thread overview]
Message-ID: <42DB2225.2070207@gmail.com> (raw)
In-Reply-To: <20050718031808.20247.43698.sendpatchset@bryan-larsens-ibook-g4.local>
This patch is broken. The original patch still works.
Bryan
Bryan Larsen wrote:
> cg-commit currently chokes when passed a very large list of files.
> Fix it.
>
> This patch depends on your filenames not containing line feeds. No
> big deal, other parts of cogito break on filenames containing line
> feeds.
>
> Resent because previous send appears to have been dropped. This patch
> is cleaner.
>
> Signed-off-by: Bryan Larsen <bryan.larsen@gmail.com>
> ---
>
> cg-commit | 6 +++---
> 1 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/cg-commit b/cg-commit
> --- a/cg-commit
> +++ b/cg-commit
> @@ -289,9 +289,9 @@ precommit_update () {
> eval "queue$op[\${#queue$op[@]}]=\"\$fname\""
> done
> # XXX: Do we even need to do the --add and --remove update-caches?
> - [ "$queueN" ] && { git-update-cache --add ${infoonly} -- "${queueN[@]}" || return 1; }
> - [ "$queueD" ] && { git-update-cache --force-remove -- "${queueD[@]}" || return 1; }
> - [ "$queueM" ] && { git-update-cache ${infoonly} -- "${queueM[@]}" || return 1; }
> + [ "$queueN" ] && { ( echo "${queueN[*]}" | tr \\n \\0 | IFS=$'\n' xargs -0 git-update-cache --add ${infoonly} -- ) || return 1; }
> + [ "$queueD" ] && { ( echo "${queueD[*]}" | tr \\n \\0 | IFS=$'\n' xargs -0 git-update-cache --force-remove -- ) || return 1; }
> + [ "$queueM" ] && { ( echo "${queueM[*]}" | tr \\n \\0 | IFS=$'\n' xargs -0 git-update-cache ${infoonly} -- ) || return 1; }
> return 0
> }
>
>
next prev parent reply other threads:[~2005-07-18 3:29 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-07-18 3:18 [PATCH] cg-commit chokes when given a very large list of files Bryan Larsen
2005-07-18 3:29 ` Bryan Larsen [this message]
-- strict thread matches above, loose matches on Subject: below --
2005-07-12 11:20 Bryan Larsen
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=42DB2225.2070207@gmail.com \
--to=bryan.larsen@gmail.com \
--cc=bryanlarsen@yahoo.com \
--cc=git@vger.kernel.org \
--cc=pasky@suse.cz \
/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).