Re: [PATCH 1/2] refs_from_alternate: helper to use refs from alternates

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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'
+		) ))
 }
 
 
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]