merge(3p/git): Merge git subtree at v2.29.2
This also bumps the stable nixpkgs to 20.09 as of 2020-11-21, because there is some breakage in the git build related to the netrc credentials helper which someone has taken care of in nixpkgs. The stable channel is not used for anything other than git, so this should be fine. Change-Id: I3575a19dab09e1e9556cf8231d717de9890484fb
This commit is contained in:
parent
082c006c04
commit
f4609b896f
1485 changed files with 241535 additions and 109418 deletions
29
third_party/git/t/t8002-blame.sh
vendored
29
third_party/git/t/t8002-blame.sh
vendored
|
|
@ -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,21 +109,32 @@ 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' '
|
||||
test_must_fail git blame --exclude-promisor-objects one
|
||||
'
|
||||
|
||||
test_expect_success 'blame with uncommitted edits in partial clone does not crash' '
|
||||
git init server &&
|
||||
echo foo >server/file.txt &&
|
||||
git -C server add file.txt &&
|
||||
git -C server commit -m file &&
|
||||
|
||||
git clone --filter=blob:none "file://$(pwd)/server" client &&
|
||||
echo bar >>client/file.txt &&
|
||||
git -C client blame file.txt
|
||||
'
|
||||
|
||||
test_done
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue