diff options
author | Junio C Hamano <gitster@pobox.com> | 2014-09-11 21:33:32 +0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2014-09-11 21:33:33 +0400 |
commit | bedd3b4b7b25df0b994abf444ee2136995dfeffa (patch) | |
tree | 1f5866f73cce9cf92d602f8d61fb6a52d1c3d3c9 /t | |
parent | 08ad26a63deaa7eaaaa987ed2cc84ac0f83c080b (diff) | |
parent | 1aaf69e669b7fd67073d3024b386ac25ac77d0f8 (diff) |
Merge branch 'nd/large-blobs'
Teach a few codepaths to punt (instead of dying) when large blobs
that would not fit in core are involved in the operation.
* nd/large-blobs:
diff: shortcut for diff'ing two binary SHA-1 objects
diff --stat: mark any file larger than core.bigfilethreshold binary
diff.c: allow to pass more flags to diff_populate_filespec
sha1_file.c: do not die failing to malloc in unpack_compressed_entry
wrapper.c: introduce gentle xmallocz that does not die()
Diffstat (limited to 't')
-rwxr-xr-x | t/t1050-large.sh | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/t/t1050-large.sh b/t/t1050-large.sh index aea493646e..05a1e1d270 100755 --- a/t/t1050-large.sh +++ b/t/t1050-large.sh @@ -112,6 +112,20 @@ test_expect_success 'diff --raw' ' git diff --raw HEAD^ ' +test_expect_success 'diff --stat' ' + git diff --stat HEAD^ HEAD +' + +test_expect_success 'diff' ' + git diff HEAD^ HEAD >actual && + grep "Binary files.*differ" actual +' + +test_expect_success 'diff --cached' ' + git diff --cached HEAD^ >actual && + grep "Binary files.*differ" actual +' + test_expect_success 'hash-object' ' git hash-object large1 ' @@ -163,4 +177,10 @@ test_expect_success 'zip achiving, deflate' ' git archive --format=zip HEAD >/dev/null ' +test_expect_success 'fsck' ' + test_must_fail git fsck 2>err && + n=$(grep "error: attempting to allocate .* over limit" err | wc -l) && + test "$n" -gt 1 +' + test_done |