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
This commit is contained in:
Ryooooooga 2022-10-16 21:31:42 +09:00 committed by Jesse Duffield
parent b33ec5a050
commit 52a2e4c1dc
39 changed files with 150 additions and 43 deletions

View file

@ -0,0 +1 @@
ref: refs/heads/new-branch

View file

@ -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

View file

@ -0,0 +1 @@
Unnamed repository; edit this file 'description' to name the repository.

View file

@ -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

View file

@ -0,0 +1 @@
0000000000000000000000000000000000000000 6d69ac71e12a83769fca195d0a714435e1f4661a CI <CI@example.com> 1665924398 +0900 branch: Created from HEAD

View file

@ -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

View file

@ -0,0 +1 @@
0000000000000000000000000000000000000000 6d69ac71e12a83769fca195d0a714435e1f4661a CI <CI@example.com> 1665924403 +0900 branch: Created from refs/heads/@

View file

@ -0,0 +1,3 @@
x<01>ÎM
Â0@a×9Eödò3Í€ˆÐU<C390>1I&ThL)<¾=Û<E2809A>·x¹·öÑ‚%A 1Û”pñ`<q”êŒC#§Y«v>ä=4XŽnBª™<C2AA>B1<<3C>÷.T<>¬ø3Ö~èyÑ÷yyÊ—Û¾É-÷öЀÈzGQ_ £N=§†ü™«´ñª~\
9f

View file

@ -0,0 +1,3 @@
x<01>Î=
1@aëœbzAfògD„­öÉdq—%Çw `ûøŠ'Kï<4B>Äñ06UÐX µ<>Ä4WOè9'mŽ ]DÝ%µf;H“5q¡*D™íYÄW*ÚÐ:iÉ™ü÷eƒi†Ë4ßô“ûúÔ“,ý
c`ë'8"#š½îSCÿä?èÌ

View file

@ -0,0 +1,3 @@
x<01>ÎA
1 @Q×=Eö´™4mAD˜•ÇHÛë C<05>ï,<€ÛÏ[ü²ôþàƦ
b±Pž8s¬-ØèœGŒXšÉErÈHÊ)U6} H^[%Ö('K¥FUa$¯…§€<C2A7>ƒ÷¸/Ì78Ï·«~¤¯O=•¥_À1û„4¥G¬5{ݧ†þÉ,š/×[;ª

View file

@ -0,0 +1 @@
6d69ac71e12a83769fca195d0a714435e1f4661a

View file

@ -0,0 +1 @@
18565748bda3ca01a67a92f340705af5a11384ae

View file

@ -0,0 +1 @@
6d69ac71e12a83769fca195d0a714435e1f4661a

View file

@ -0,0 +1 @@
file01 content

View file

@ -0,0 +1 @@
file02 content

View file

@ -0,0 +1 @@
file03 content