4c10a5caa7 (blame: -b (blame.blankboundary) and --root (blame.showroot), 2006-12-18) introduced the -b option. Add a test. The sed script removes the last hex digit from boundary commit oids '^hexx msg' -> '^hex msg' until all leading hex's are gone, finally removing the boundary commit marker. Signed-off-by: Philip Oakley <philipoakley@iee.email> --- t/t8002-blame.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/t/t8002-blame.sh b/t/t8002-blame.sh index d4877c7c54..de0f81abe9 100755 --- a/t/t8002-blame.sh +++ b/t/t8002-blame.sh @@ -129,4 +129,16 @@ test_expect_success 'test --blame-only, exclude boundary commits' ' test_cmp expected actual ' +test_expect_success 'test -b option, blank oid for boundary commits' ' + git blame -b branch1.. -- file >actual && + git blame branch1.. -- file >full && + sed -e "/^\^/{ + :loop; + s/^\(\^[0-9a-f]*\)[0-9a-f] \(.*\)/\1 \2/g; + tloop; + s/^\^/ /; + }" full >expected && + test_cmp expected actual +' + test_done -- 2.26.2.windows.1.13.g9dddff6983