From: Johannes Sixt <j6t@kdbg.org>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org, "Shawn O. Pearce" <spearce@spearce.org>
Subject: Re: [PATCH 1/2] refs_from_alternate: helper to use refs from alternates
Date: Sat, 12 Mar 2011 00:08:27 +0100 [thread overview]
Message-ID: <201103120008.27973.j6t@kdbg.org> (raw)
In-Reply-To: <1299876671-12838-1-git-send-email-gitster@pobox.com>
On Freitag, 11. März 2011, Junio C Hamano wrote:
> +count_objects () {
> + (
> + echo 0 &&
> + git count-objects -v |
> + sed -n -e 's/^count: \(.*\)/\1 +/p' \
> + -e 's/^in-pack: \(.*\)/\1 +/p' &&
> + echo p
> + ) | dc
> +}
Can we have this without using dc? (We don't have it on Windows.)
diff --git a/t/t5501-fetch-push-alternates.sh
b/t/t5501-fetch-push-alternates.sh
index 564ef7c..eb844cf 100755
--- a/t/t5501-fetch-push-alternates.sh
+++ b/t/t5501-fetch-push-alternates.sh
@@ -4,13 +4,11 @@ test_description='fetch/push involving alternates'
. ./test-lib.sh
count_objects () {
- (
- echo 0 &&
+ echo $(( $(
git count-objects -v |
sed -n -e 's/^count: \(.*\)/\1 +/p' \
- -e 's/^in-pack: \(.*\)/\1 +/p' &&
- echo p
- ) | dc
+ -e 's/^in-pack: \(.*\)/\1/p'
+ ) ))
}
next prev parent reply other threads:[~2011-03-11 23:08 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-11 20:51 [PATCH 1/2] refs_from_alternate: helper to use refs from alternates Junio C Hamano
2011-03-11 20:51 ` [PATCH 2/2] fetch-pack: objects in our alternates are available to us Junio C Hamano
2011-03-15 1:57 ` Shawn Pearce
2011-03-11 23:08 ` Johannes Sixt [this message]
2011-03-11 23:15 ` [PATCH 1/2] refs_from_alternate: helper to use refs from alternates Junio C Hamano
2011-03-11 23:32 ` 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=201103120008.27973.j6t@kdbg.org \
--to=j6t@kdbg.org \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=spearce@spearce.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).