diff options
author | Ryooooooga <eial5q265e5@gmail.com> | 2022-10-16 21:31:42 +0900 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2022-11-14 19:05:07 +1100 |
commit | 52a2e4c1dc270c95366d05687de514caed95f695 (patch) | |
tree | 3c0d5d086da0a365c8429166a903874f6c5aaf2f /test/integration_new | |
parent | b33ec5a05025a2755f4511f042e9e0fcb224bf47 (diff) |
fix: fix ambiguous branch name
test: add an integration test for checkout branch by name
fix: fix full ref name of detached head
refactor: refactor current branch loader
chore: use field name explicitly
Diffstat (limited to 'test/integration_new')
28 files changed, 43 insertions, 0 deletions
diff --git a/test/integration_new/branch/checkout_by_name/expected/repo/.git_keep/COMMIT_EDITMSG b/test/integration_new/branch/checkout_by_name/expected/repo/.git_keep/COMMIT_EDITMSG new file mode 100644 index 000000000..907b30816 --- /dev/null +++ b/test/integration_new/branch/checkout_by_name/expected/repo/.git_keep/COMMIT_EDITMSG @@ -0,0 +1 @@ +blah diff --git a/test/integration_new/branch/checkout_by_name/expected/repo/.git_keep/FETCH_HEAD b/test/integration_new/branch/checkout_by_name/expected/repo/.git_keep/FETCH_HEAD new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/test/integration_new/branch/checkout_by_name/expected/repo/.git_keep/FETCH_HEAD diff --git a/test/integration_new/branch/checkout_by_name/expected/repo/.git_keep/HEAD b/test/integration_new/branch/checkout_by_name/expected/repo/.git_keep/HEAD new file mode 100644 index 000000000..574f30abf --- /dev/null +++ b/test/integration_new/branch/checkout_by_name/expected/repo/.git_keep/HEAD @@ -0,0 +1 @@ +ref: refs/heads/new-branch diff --git a/test/integration_new/branch/checkout_by_name/expected/repo/.git_keep/commit-template.txt b/test/integration_new/branch/checkout_by_name/expected/repo/.git_keep/commit-template.txt new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/test/integration_new/branch/checkout_by_name/expected/repo/.git_keep/commit-template.txt diff --git a/test/integration_new/branch/checkout_by_name/expected/repo/.git_keep/config b/test/integration_new/branch/checkout_by_name/expected/repo/.git_keep/config new file mode 100644 index 000000000..8a748ce32 --- /dev/null +++ b/test/integration_new/branch/checkout_by_name/expected/repo/.git_keep/config @@ -0,0 +1,12 @@ +[core] + repositoryformatversion = 0 + filemode = true + bare = false + logallrefupdates = true + ignorecase = true + precomposeunicode = true +[user] + email = CI@example.com + name = CI +[commit] + gpgSign = false diff --git a/test/integration_new/branch/checkout_by_name/expected/repo/.git_keep/description b/test/integration_new/branch/checkout_by_name/expected/repo/.git_keep/description new file mode 100644 index 000000000..498b267a8 --- /dev/null +++ b/test/integration_new/branch/checkout_by_name/expected/repo/.git_keep/description @@ -0,0 +1 @@ +Unnamed repository; edit this file 'description' to name the repository. diff --git a/test/integration_new/branch/checkout_by_name/expected/repo/.git_keep/index b/test/integration_new/branch/checkout_by_name/expected/repo/.git_keep/index Binary files differnew file mode 100644 index 000000000..5e9399cf8 --- /dev/null +++ b/test/integration_new/branch/checkout_by_name/expected/repo/.git_keep/index diff --git a/test/integration_new/branch/checkout_by_name/expected/repo/.git_keep/info/exclude b/test/integration_new/branch/checkout_by_name/expected/repo/.git_keep/info/exclude new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/test/integration_new/branch/checkout_by_name/expected/repo/.git_keep/info/exclude diff --git a/test/integration_new/branch/checkout_by_name/expected/repo/.git_keep/logs/HEAD b/test/integration_new/branch/checkout_by_name/expected/repo/.git_keep/logs/HEAD new file mode 100644 index 000000000..d34fb4066 --- /dev/null +++ b/test/integration_new/branch/checkout_by_name/expected/repo/.git_keep/logs/HEAD @@ -0,0 +1,7 @@ +0000000000000000000000000000000000000000 95efd4ea6ed74b904cd8eeeaa6245ec462372f67 CI <CI@example.com> 1665924398 +0900 commit (initial): commit 01 +95efd4ea6ed74b904cd8eeeaa6245ec462372f67 cfc66e0e89b1dc11a927cc453dbee025ff03cf83 CI <CI@example.com> 1665924398 +0900 commit: commit 02 +cfc66e0e89b1dc11a927cc453dbee025ff03cf83 6d69ac71e12a83769fca195d0a714435e1f4661a CI <CI@example.com> 1665924398 +0900 commit: commit 03 +6d69ac71e12a83769fca195d0a714435e1f4661a 6d69ac71e12a83769fca195d0a714435e1f4661a CI <CI@example.com> 1665924398 +0900 checkout: moving from master to @ +6d69ac71e12a83769fca195d0a714435e1f4661a 6d69ac71e12a83769fca195d0a714435e1f4661a CI <CI@example.com> 1665924398 +0900 checkout: moving from @ to master +6d69ac71e12a83769fca195d0a714435e1f4661a 18565748bda3ca01a67a92f340705af5a11384ae CI <CI@example.com> 1665924398 +0900 commit: blah +18565748bda3ca01a67a92f340705af5a11384ae 6d69ac71e12a83769fca195d0a714435e1f4661a CI <CI@example.com> 1665924403 +0900 checkout: moving from master to new-branch diff --git a/test/integration_new/branch/checkout_by_name/expected/repo/.git_keep/logs/refs/heads/@ b/test/integration_new/branch/checkout_by_name/expected/repo/.git_keep/logs/refs/heads/@ new file mode 100644 index 000000000..96ceab46c --- /dev/null +++ b/test/integration_new/branch/checkout_by_name/expected/repo/.git_keep/logs/refs/heads/@ @@ -0,0 +1 @@ +0000000000000000000000000000000000000000 6d69ac71e12a83769fca195d0a714435e1f4661a CI <CI@example.com> 1665924398 +0900 branch: Created from HEAD diff --git a/test/integration_new/branch/checkout_by_name/expected/repo/.git_keep/logs/refs/heads/master b/test/integration_new/branch/checkout_by_name/expected/repo/.git_keep/logs/refs/heads/master new file mode 100644 index 000000000..d04f9469b --- /dev/null +++ b/test/integration_new/branch/checkout_by_name/expected/repo/.git_keep/logs/refs/heads/master @@ -0,0 +1,4 @@ +0000000000000000000000000000000000000000 95efd4ea6ed74b904cd8eeeaa6245ec462372f67 CI <CI@example.com> 1665924398 +0900 commit (initial): commit 01 +95efd4ea6ed74b904cd8eeeaa6245ec462372f67 cfc66e0e89b1dc11a927cc453dbee025ff03cf83 CI <CI@example.com> 1665924398 +0900 commit: commit 02 +cfc66e0e89b1dc11a927cc453dbee025ff03cf83 6d69ac71e12a83769fca195d0a714435e1f4661a CI <CI@example.com> 1665924398 +0900 commit: commit 03 +6d69ac71e12a83769fca195d0a714435e1f4661a 18565748bda3ca01a67a92f340705af5a11384ae CI <CI@example.com> 1665924398 +0900 commit: blah diff --git a/test/integration_new/branch/checkout_by_name/expected/repo/.git_keep/logs/refs/heads/new-branch b/test/integration_new/branch/checkout_by_name/expected/repo/.git_keep/logs/refs/heads/new-branch new file mode 100644 index 000000000..dcfac6de4 --- /dev/null +++ b/test/integration_new/branch/checkout_by_name/expected/repo/.git_keep/logs/refs/heads/new-branch @@ -0,0 +1 @@ +0000000000000000000000000000000000000000 6d69ac71e12a83769fca195d0a714435e1f4661a CI <CI@example.com> 1665924403 +0900 branch: Created from refs/heads/@ diff --git a/test/integration_new/branch/checkout_by_name/expected/repo/.git_keep/objects/06/47fe4b7302efbfb235b8f0681b592cc3389d36 b/test/integration_new/branch/checkout_by_name/expected/repo/.git_keep/objects/06/47fe4b7302efbfb235b8f0681b592cc3389d36 Binary files differnew file mode 100644 index 000000000..a8a2b586d --- /dev/null +++ b/test/integration_new/branch/checkout_by_name/expected/repo/.git_keep/objects/06/47fe4b7302efbfb235b8f0681b592cc3389d36 diff --git a/test/integration_new/branch/checkout_by_name/expected/repo/.git_keep/objects/18/565748bda3ca01a67a92f340705af5a11384ae b/test/integration_new/branch/checkout_by_name/expected/repo/.git_keep/objects/18/565748bda3ca01a67a92f340705af5a11384ae new file mode 100644 index 000000000..111cf1d1f --- /dev/null +++ b/test/integration_new/branch/checkout_by_name/expected/repo/.git_keep/objects/18/565748bda3ca01a67a92f340705af5a11384ae @@ -0,0 +1,3 @@ +xM +0@a9Ed3̀U1I&ThL)<=ۏx.т%A
1۔p`<qC#Yv>=4$XnBB1<.T3~yyyʗ۾-ЀzGQ_
N=~\ +9f
\ No newline at end of file diff --git a/test/integration_new/branch/checkout_by_name/expected/repo/.git_keep/objects/3b/f868a389d0073e715e848f0ee33d71064539ca b/test/integration_new/branch/checkout_by_name/expected/repo/.git_keep/objects/3b/f868a389d0073e715e848f0ee33d71064539ca Binary files differnew file mode 100644 index 000000000..07b07e91f --- /dev/null +++ b/test/integration_new/branch/checkout_by_name/expected/repo/.git_keep/objects/3b/f868a389d0073e715e848f0ee33d71064539ca diff --git a/test/integration_new/branch/checkout_by_name/expected/repo/.git_keep/objects/47/d78ad7a27fc7fe483389512ebf7ea34c5514bc b/test/integration_new/branch/checkout_by_name/expected/repo/.git_keep/objects/47/d78ad7a27fc7fe483389512ebf7ea34c5514bc Binary files differnew file mode 100644 index 000000000..c562d38cc --- /dev/null +++ b/test/integration_new/branch/checkout_by_name/expected/repo/.git_keep/objects/47/d78ad7a27fc7fe483389512ebf7ea34c5514bc diff --git a/test/integration_new/branch/checkout_by_name/expected/repo/.git_keep/objects/55/3197193920043fb04f3e39e825916990955204 b/test/integration_new/branch/checkout_by_name/expected/repo/.git_keep/objects/55/3197193920043fb04f3e39e825916990955204 Binary files differnew file mode 100644 index 000000000..ac90c394a --- /dev/null +++ b/test/integration_new/branch/checkout_by_name/expected/repo/.git_keep/objects/55/3197193920043fb04f3e39e825916990955204 diff --git a/test/integration_new/branch/checkout_by_name/expected/repo/.git_keep/objects/6d/69ac71e12a83769fca195d0a714435e1f4661a b/test/integration_new/branch/checkout_by_name/expected/repo/.git_keep/objects/6d/69ac71e12a83769fca195d0a714435e1f4661a new file mode 100644 index 000000000..075130a92 --- /dev/null +++ b/test/integration_new/branch/checkout_by_name/expected/repo/.git_keep/objects/6d/69ac71e12a83769fca195d0a714435e1f4661a @@ -0,0 +1,3 @@ +x= +1@abzAfgDdq%w`'K06UXĖ4WO9'm ]Dݛ%f͛H5q*DYW*:iəei4ԓ, +c`'8"#SC?;
\ No newline at end of file diff --git a/test/integration_new/branch/checkout_by_name/expected/repo/.git_keep/objects/95/efd4ea6ed74b904cd8eeeaa6245ec462372f67 b/test/integration_new/branch/checkout_by_name/expected/repo/.git_keep/objects/95/efd4ea6ed74b904cd8eeeaa6245ec462372f67 Binary files differnew file mode 100644 index 000000000..4001d6ab3 --- /dev/null +++ b/test/integration_new/branch/checkout_by_name/expected/repo/.git_keep/objects/95/efd4ea6ed74b904cd8eeeaa6245ec462372f67 diff --git a/test/integration_new/branch/checkout_by_name/expected/repo/.git_keep/objects/a0/2c4b36b68df7081152282cf1aabcab7b24e69b b/test/integration_new/branch/checkout_by_name/expected/repo/.git_keep/objects/a0/2c4b36b68df7081152282cf1aabcab7b24e69b Binary files differnew file mode 100644 index 000000000..85866acd8 --- /dev/null +++ b/test/integration_new/branch/checkout_by_name/expected/repo/.git_keep/objects/a0/2c4b36b68df7081152282cf1aabcab7b24e69b diff --git a/test/integration_new/branch/checkout_by_name/expected/repo/.git_keep/objects/cf/c66e0e89b1dc11a927cc453dbee025ff03cf83 b/test/integration_new/branch/checkout_by_name/expected/repo/.git_keep/objects/cf/c66e0e89b1dc11a927cc453dbee025ff03cf83 new file mode 100644 index 000000000..3e1a2801d --- /dev/null +++ b/test/integration_new/branch/checkout_by_name/expected/repo/.git_keep/objects/cf/c66e0e89b1dc11a927cc453dbee025ff03cf83 @@ -0,0 +1,3 @@ +xA +1@Q=E4mADHC,<[Ʀ +bP8s-GXErH)U6}
H^[%('KFUa$/78Ϸ~O=_14G5{ݧ,/[;
\ No newline at end of file diff --git a/test/integration_new/branch/checkout_by_name/expected/repo/.git_keep/objects/e6/db1f58c2bb5ead41049a8ef3910360eead21e2 b/test/integration_new/branch/checkout_by_name/expected/repo/.git_keep/objects/e6/db1f58c2bb5ead41049a8ef3910360eead21e2 Binary files differnew file mode 100644 index 000000000..8bcfafeb6 --- /dev/null +++ b/test/integration_new/branch/checkout_by_name/expected/repo/.git_keep/objects/e6/db1f58c2bb5ead41049a8ef3910360eead21e2 diff --git a/test/integration_new/branch/checkout_by_name/expected/repo/.git_keep/refs/heads/@ b/test/integration_new/branch/checkout_by_name/expected/repo/.git_keep/refs/heads/@ new file mode 100644 index 000000000..2f00c9f3a --- /dev/null +++ b/test/integration_new/branch/checkout_by_name/expected/repo/.git_keep/refs/heads/@ @@ -0,0 +1 @@ +6d69ac71e12a83769fca195d0a714435e1f4661a diff --git a/test/integration_new/branch/checkout_by_name/expected/repo/.git_keep/refs/heads/master b/test/integration_new/branch/checkout_by_name/expected/repo/.git_keep/refs/heads/master new file mode 100644 index 000000000..15e666674 --- /dev/null +++ b/test/integration_new/branch/checkout_by_name/expected/repo/.git_keep/refs/heads/master @@ -0,0 +1 @@ +18565748bda3ca01a67a92f340705af5a11384ae diff --git a/test/integration_new/branch/checkout_by_name/expected/repo/.git_keep/refs/heads/new-branch b/test/integration_new/branch/checkout_by_name/expected/repo/.git_keep/refs/heads/new-branch new file mode 100644 index 000000000..2f00c9f3a --- /dev/null +++ b/test/integration_new/branch/checkout_by_name/expected/repo/.git_keep/refs/heads/new-branch @@ -0,0 +1 @@ +6d69ac71e12a83769fca195d0a714435e1f4661a diff --git a/test/integration_new/branch/checkout_by_name/expected/repo/file01.txt b/test/integration_new/branch/checkout_by_name/expected/repo/file01.txt new file mode 100644 index 000000000..47d78ad7a --- /dev/null +++ b/test/integration_new/branch/checkout_by_name/expected/repo/file01.txt @@ -0,0 +1 @@ +file01 content
\ No newline at end of file diff --git a/test/integration_new/branch/checkout_by_name/expected/repo/file02.txt b/test/integration_new/branch/checkout_by_name/expected/repo/file02.txt new file mode 100644 index 000000000..0647fe4b7 --- /dev/null +++ b/test/integration_new/branch/checkout_by_name/expected/repo/file02.txt @@ -0,0 +1 @@ +file02 content
\ No newline at end of file diff --git a/test/integration_new/branch/checkout_by_name/expected/repo/file03.txt b/test/integration_new/branch/checkout_by_name/expected/repo/file03.txt new file mode 100644 index 000000000..3bf868a38 --- /dev/null +++ b/test/integration_new/branch/checkout_by_name/expected/repo/file03.txt @@ -0,0 +1 @@ +file03 content
\ No newline at end of file |