summaryrefslogtreecommitdiff
path: root/t/t1050-large.sh
diff options
context:
space:
mode:
authorSteffen Prohaska <prohaska@zib.de>2014-08-26 15:23:22 (GMT)
committerJunio C Hamano <gitster@pobox.com>2014-08-28 17:25:04 (GMT)
commit9927d9627fe01d780e754a02cf9adc36e084c587 (patch)
treec3e2a34e3aefcfd0d60da54214ccf2f7f0112e29 /t/t1050-large.sh
parent23b0c4782e5f9357e6189253021053a4404ddf4e (diff)
downloadgit-9927d9627fe01d780e754a02cf9adc36e084c587.zip
git-9927d9627fe01d780e754a02cf9adc36e084c587.tar.gz
git-9927d9627fe01d780e754a02cf9adc36e084c587.tar.bz2
memory_limit: use git_env_ulong() to parse GIT_ALLOC_LIMIT
GIT_ALLOC_LIMIT limits xmalloc()'s size, which is of type size_t. Better use git_env_ulong() to parse the environment variable, so that the postfixes 'k', 'm', and 'g' can be used; and use size_t to store the limit for consistency. The change to size_t has no direct practical impact, because the environment variable is only meant to be used for our own tests, and we use it to test small sizes. The cast of size in the call to die() is changed to uintmax_t to match the format string PRIuMAX. Signed-off-by: Steffen Prohaska <prohaska@zib.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t1050-large.sh')
-rwxr-xr-xt/t1050-large.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/t/t1050-large.sh b/t/t1050-large.sh
index aea4936..e7657ab 100755
--- a/t/t1050-large.sh
+++ b/t/t1050-large.sh
@@ -13,7 +13,7 @@ test_expect_success setup '
echo X | dd of=large2 bs=1k seek=2000 &&
echo X | dd of=large3 bs=1k seek=2000 &&
echo Y | dd of=huge bs=1k seek=2500 &&
- GIT_ALLOC_LIMIT=1500 &&
+ GIT_ALLOC_LIMIT=1500k &&
export GIT_ALLOC_LIMIT
'