Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2020-08-12 04:04:11 +0300
committerJunio C Hamano <gitster@pobox.com>2020-08-12 04:04:11 +0300
commite0ad9574ddf5bb14d9ed6808112485ce0da99fea (patch)
tree633eb1867a929588ec5b3d8af351a93ba62aac5a /t/t8002-blame.sh
parent4f0a8be78499454eac3985b6e7e144b8376ab0a5 (diff)
parente023ff0691ca207d421a0e75ea23c132ada9142a (diff)
Merge branch 'bc/sha-256-part-3'
The final leg of SHA-256 transition. * bc/sha-256-part-3: (39 commits) t: remove test_oid_init in tests docs: add documentation for extensions.objectFormat ci: run tests with SHA-256 t: make SHA1 prerequisite depend on default hash t: allow testing different hash algorithms via environment t: add test_oid option to select hash algorithm repository: enable SHA-256 support by default setup: add support for reading extensions.objectformat bundle: add new version for use with SHA-256 builtin/verify-pack: implement an --object-format option http-fetch: set up git directory before parsing pack hashes t0410: mark test with SHA1 prerequisite t5308: make test work with SHA-256 t9700: make hash size independent t9500: ensure that algorithm info is preserved in config t9350: make hash size independent t9301: make hash size independent t9300: use $ZERO_OID instead of hard-coded object ID t9300: abstract away SHA-1-specific constants t8011: make hash size independent ...
Diffstat (limited to 't/t8002-blame.sh')
-rwxr-xr-xt/t8002-blame.sh18
1 files changed, 11 insertions, 7 deletions
diff --git a/t/t8002-blame.sh b/t/t8002-blame.sh
index 2ed6aaae35..015973e8fe 100755
--- a/t/t8002-blame.sh
+++ b/t/t8002-blame.sh
@@ -6,6 +6,10 @@ test_description='git blame'
PROG='git blame -c'
. "$TEST_DIRECTORY"/annotate-tests.sh
+test_expect_success 'setup' '
+ hexsz=$(test_oid hexsz)
+'
+
test_expect_success 'blame untracked file in empty repo' '
>untracked &&
test_must_fail git blame untracked
@@ -105,17 +109,17 @@ test_expect_success 'blame --abbrev=<n> works' '
'
test_expect_success 'blame -l aligns regular and boundary commits' '
- check_abbrev 40 -l HEAD &&
- check_abbrev 39 -l ^HEAD
+ check_abbrev $hexsz -l HEAD &&
+ check_abbrev $((hexsz - 1)) -l ^HEAD
'
-test_expect_success 'blame --abbrev=40 behaves like -l' '
- check_abbrev 40 --abbrev=40 HEAD &&
- check_abbrev 39 --abbrev=40 ^HEAD
+test_expect_success 'blame --abbrev with full length behaves like -l' '
+ check_abbrev $hexsz --abbrev=$hexsz HEAD &&
+ check_abbrev $((hexsz - 1)) --abbrev=$hexsz ^HEAD
'
-test_expect_success '--no-abbrev works like --abbrev=40' '
- check_abbrev 40 --no-abbrev
+test_expect_success '--no-abbrev works like --abbrev with full length' '
+ check_abbrev $hexsz --no-abbrev
'
test_expect_success '--exclude-promisor-objects does not BUG-crash' '