From a9ecaa06a7235e62a9cf4703a19463fcee4449c7 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Tue, 1 Sep 2020 07:43:55 +0000 Subject: core.abbrev=no disables abbreviations This allows users to write hash-agnostic scripts and configs by disabling abbreviations. Using "-c core.abbrev=40" will be insufficient with SHA-256, and "-c core.abbrev=64" won't work with SHA-1 repos today. Signed-off-by: Eric Wong [jc: tweaked implementation, added doc and a test] Signed-off-by: Junio C Hamano --- t/t3200-branch.sh | 2 ++ 1 file changed, 2 insertions(+) (limited to 't/t3200-branch.sh') diff --git a/t/t3200-branch.sh b/t/t3200-branch.sh index 4c0734157b..d9ed1f7c94 100755 --- a/t/t3200-branch.sh +++ b/t/t3200-branch.sh @@ -305,7 +305,9 @@ test_expect_success 'git branch --list -v with --abbrev' ' git branch -v --list --no-abbrev t >actual.noabbrev && git branch -v --list --abbrev=0 t >actual.0abbrev && + git -c core.abbrev=no branch -v --list t >actual.noabbrev-conf && test_cmp actual.noabbrev actual.0abbrev && + test_cmp actual.noabbrev actual.noabbrev-conf && git branch -v --list --abbrev=36 t >actual.36abbrev && # how many hexdigits are used? -- cgit v1.2.3