mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-12-01 22:52:01 +02:00
add tests for dealing with remotes
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
myfile4 conflict
|
||||
|
||||
# Please enter the commit message for your changes. Lines starting
|
||||
# with '#' will be ignored, and an empty message aborts the commit.
|
||||
#
|
||||
# interactive rebase in progress; onto ea4a99e
|
||||
# Last command done (1 command done):
|
||||
# pick efbb36c myfile4 conflict
|
||||
# Next commands to do (3 remaining commands):
|
||||
# pick 9147ce4 5
|
||||
# pick e2251a5 6
|
||||
# You are currently rebasing branch 'master' on 'ea4a99e'.
|
||||
#
|
||||
# Changes to be committed:
|
||||
# modified: myfile4
|
||||
#
|
||||
@@ -0,0 +1 @@
|
||||
ea4a99ea801f54f1ec09a88a28c65eb4db5865aa branch 'master' of ../actual_remote
|
||||
@@ -0,0 +1 @@
|
||||
ref: refs/heads/master
|
||||
@@ -0,0 +1 @@
|
||||
efbb36c97316886b089b1b27233cd8bfdc37ed4a
|
||||
@@ -0,0 +1,18 @@
|
||||
[core]
|
||||
repositoryformatversion = 0
|
||||
filemode = true
|
||||
bare = false
|
||||
logallrefupdates = true
|
||||
ignorecase = true
|
||||
precomposeunicode = true
|
||||
[user]
|
||||
email = CI@example.com
|
||||
name = CI
|
||||
[remote "origin"]
|
||||
url = ../actual_remote
|
||||
fetch = +refs/heads/*:refs/remotes/origin/*
|
||||
[branch "master"]
|
||||
remote = origin
|
||||
merge = refs/heads/master
|
||||
[pull]
|
||||
rebase = interactive
|
||||
@@ -0,0 +1 @@
|
||||
Unnamed repository; edit this file 'description' to name the repository.
|
||||
BIN
test/integration/pullRebaseInteractive/expected/.git_keep/index
Normal file
BIN
test/integration/pullRebaseInteractive/expected/.git_keep/index
Normal file
Binary file not shown.
@@ -0,0 +1,7 @@
|
||||
# git ls-files --others --exclude-from=.git/info/exclude
|
||||
# Lines that start with '#' are comments.
|
||||
# For a project mostly in C, the following would be a good set of
|
||||
# exclude patterns (uncomment them if you want to use them):
|
||||
# *.[oa]
|
||||
# *~
|
||||
.DS_Store
|
||||
@@ -0,0 +1,15 @@
|
||||
0000000000000000000000000000000000000000 74ca3dec707dde7c92727d9490517e498360fea8 CI <CI@example.com> 1634896929 +1100 commit (initial): myfile1
|
||||
74ca3dec707dde7c92727d9490517e498360fea8 ca58e8d47d619ffb625dc021f0ab2bb0f0bcf623 CI <CI@example.com> 1634896929 +1100 commit: myfile2
|
||||
ca58e8d47d619ffb625dc021f0ab2bb0f0bcf623 3fb33027aedae13ab0796292c821a0258f6c2f7b CI <CI@example.com> 1634896929 +1100 commit: myfile3
|
||||
3fb33027aedae13ab0796292c821a0258f6c2f7b ea4a99ea801f54f1ec09a88a28c65eb4db5865aa CI <CI@example.com> 1634896929 +1100 commit: myfile4
|
||||
ea4a99ea801f54f1ec09a88a28c65eb4db5865aa ca58e8d47d619ffb625dc021f0ab2bb0f0bcf623 CI <CI@example.com> 1634896929 +1100 reset: moving to head^^
|
||||
ca58e8d47d619ffb625dc021f0ab2bb0f0bcf623 efbb36c97316886b089b1b27233cd8bfdc37ed4a CI <CI@example.com> 1634896929 +1100 commit: myfile4 conflict
|
||||
efbb36c97316886b089b1b27233cd8bfdc37ed4a 9147ce4817b84339d884cee1683f361fd3aa4696 CI <CI@example.com> 1634896929 +1100 commit: 5
|
||||
9147ce4817b84339d884cee1683f361fd3aa4696 e2251a5b6d32bf5fc57f234946e3fabeba3b5cca CI <CI@example.com> 1634896929 +1100 commit: 6
|
||||
e2251a5b6d32bf5fc57f234946e3fabeba3b5cca 89ee54b2ed7aff7c3aae24f64be85568f9a9d329 CI <CI@example.com> 1634896929 +1100 commit: 7
|
||||
89ee54b2ed7aff7c3aae24f64be85568f9a9d329 ea4a99ea801f54f1ec09a88a28c65eb4db5865aa CI <CI@example.com> 1634896931 +1100 rebase -i (start): checkout ea4a99ea801f54f1ec09a88a28c65eb4db5865aa
|
||||
ea4a99ea801f54f1ec09a88a28c65eb4db5865aa 29daf999882c9e60c6b6a2868913a6cfd856d620 CI <CI@example.com> 1634896933 +1100 rebase -i (continue): myfile4 conflict
|
||||
29daf999882c9e60c6b6a2868913a6cfd856d620 5c32741b468f0ab8ddd243e9871dcc8dec5c35f9 CI <CI@example.com> 1634896933 +1100 rebase -i (pick): 5
|
||||
5c32741b468f0ab8ddd243e9871dcc8dec5c35f9 423f7757eb2eea3de217b54447a94820af933d3a CI <CI@example.com> 1634896933 +1100 rebase -i (pick): 6
|
||||
423f7757eb2eea3de217b54447a94820af933d3a bf4fb489636d4bde42e478b04cbdcc079dcd0183 CI <CI@example.com> 1634896933 +1100 rebase -i (pick): 7
|
||||
bf4fb489636d4bde42e478b04cbdcc079dcd0183 bf4fb489636d4bde42e478b04cbdcc079dcd0183 CI <CI@example.com> 1634896933 +1100 rebase -i (finish): returning to refs/heads/master
|
||||
@@ -0,0 +1,10 @@
|
||||
0000000000000000000000000000000000000000 74ca3dec707dde7c92727d9490517e498360fea8 CI <CI@example.com> 1634896929 +1100 commit (initial): myfile1
|
||||
74ca3dec707dde7c92727d9490517e498360fea8 ca58e8d47d619ffb625dc021f0ab2bb0f0bcf623 CI <CI@example.com> 1634896929 +1100 commit: myfile2
|
||||
ca58e8d47d619ffb625dc021f0ab2bb0f0bcf623 3fb33027aedae13ab0796292c821a0258f6c2f7b CI <CI@example.com> 1634896929 +1100 commit: myfile3
|
||||
3fb33027aedae13ab0796292c821a0258f6c2f7b ea4a99ea801f54f1ec09a88a28c65eb4db5865aa CI <CI@example.com> 1634896929 +1100 commit: myfile4
|
||||
ea4a99ea801f54f1ec09a88a28c65eb4db5865aa ca58e8d47d619ffb625dc021f0ab2bb0f0bcf623 CI <CI@example.com> 1634896929 +1100 reset: moving to head^^
|
||||
ca58e8d47d619ffb625dc021f0ab2bb0f0bcf623 efbb36c97316886b089b1b27233cd8bfdc37ed4a CI <CI@example.com> 1634896929 +1100 commit: myfile4 conflict
|
||||
efbb36c97316886b089b1b27233cd8bfdc37ed4a 9147ce4817b84339d884cee1683f361fd3aa4696 CI <CI@example.com> 1634896929 +1100 commit: 5
|
||||
9147ce4817b84339d884cee1683f361fd3aa4696 e2251a5b6d32bf5fc57f234946e3fabeba3b5cca CI <CI@example.com> 1634896929 +1100 commit: 6
|
||||
e2251a5b6d32bf5fc57f234946e3fabeba3b5cca 89ee54b2ed7aff7c3aae24f64be85568f9a9d329 CI <CI@example.com> 1634896929 +1100 commit: 7
|
||||
89ee54b2ed7aff7c3aae24f64be85568f9a9d329 bf4fb489636d4bde42e478b04cbdcc079dcd0183 CI <CI@example.com> 1634896933 +1100 rebase -i (finish): refs/heads/master onto ea4a99ea801f54f1ec09a88a28c65eb4db5865aa
|
||||
@@ -0,0 +1 @@
|
||||
0000000000000000000000000000000000000000 ea4a99ea801f54f1ec09a88a28c65eb4db5865aa CI <CI@example.com> 1634896929 +1100 fetch origin: storing head
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,5 @@
|
||||
x}�A
|
||||
1�a�=E��4M�I@D���6)
|
||||
��
|
||||
�.\�}|�������}W�>x ����2�J��A*8!:��l�����X�On!Qu�F"�*�R
|
||||
��!be�����v^�y^���m{ꩬ�b!a N��aܘ�����9⏛d�-�7�
|
||||
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,2 @@
|
||||
x��A
|
||||
�0@Q�9��ɤ�4��c�L��!R"����~����H|��*x�\��2&��H1r��H
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,2 @@
|
||||
x��A
|
||||
�0@Q�9E��df�I"BW=�4N���R"����~�◵��[���wU��!z%�)U�0�$X#��P$d0������D�0�>D�dr13f, A�T�`���w��F{ƻ~�m�^��n�|ʜ1�3�s���T�?�i�:/���g8�
|
||||
@@ -0,0 +1,2 @@
|
||||
x��A
|
||||
�0@Q�9E��̤ɘ���U�1�N�ИR"����>��K�u���p껪e�I��P�� g�2��x���z2���V8D�̈́��L.�pv9C�,��`�ݟm��do����mՋ�z�H����K��`=������-˪�J{�u�n~/�>@
|
||||
Binary file not shown.
@@ -0,0 +1 @@
|
||||
bf4fb489636d4bde42e478b04cbdcc079dcd0183
|
||||
@@ -0,0 +1 @@
|
||||
ea4a99ea801f54f1ec09a88a28c65eb4db5865aa
|
||||
1
test/integration/pullRebaseInteractive/expected/myfile1
Normal file
1
test/integration/pullRebaseInteractive/expected/myfile1
Normal file
@@ -0,0 +1 @@
|
||||
test1
|
||||
1
test/integration/pullRebaseInteractive/expected/myfile2
Normal file
1
test/integration/pullRebaseInteractive/expected/myfile2
Normal file
@@ -0,0 +1 @@
|
||||
test2
|
||||
1
test/integration/pullRebaseInteractive/expected/myfile3
Normal file
1
test/integration/pullRebaseInteractive/expected/myfile3
Normal file
@@ -0,0 +1 @@
|
||||
test3
|
||||
1
test/integration/pullRebaseInteractive/expected/myfile4
Normal file
1
test/integration/pullRebaseInteractive/expected/myfile4
Normal file
@@ -0,0 +1 @@
|
||||
conflict
|
||||
1
test/integration/pullRebaseInteractive/expected/myfile5
Normal file
1
test/integration/pullRebaseInteractive/expected/myfile5
Normal file
@@ -0,0 +1 @@
|
||||
test
|
||||
1
test/integration/pullRebaseInteractive/expected/myfile6
Normal file
1
test/integration/pullRebaseInteractive/expected/myfile6
Normal file
@@ -0,0 +1 @@
|
||||
test
|
||||
1
test/integration/pullRebaseInteractive/expected/myfile7
Normal file
1
test/integration/pullRebaseInteractive/expected/myfile7
Normal file
@@ -0,0 +1 @@
|
||||
test
|
||||
@@ -0,0 +1 @@
|
||||
ref: refs/heads/master
|
||||
@@ -0,0 +1,8 @@
|
||||
[core]
|
||||
repositoryformatversion = 0
|
||||
filemode = true
|
||||
bare = true
|
||||
ignorecase = true
|
||||
precomposeunicode = true
|
||||
[remote "origin"]
|
||||
url = /Users/jesseduffieldduffield/go/src/github.com/jesseduffield/lazygit/test/integration/pullRebaseInteractive/./actual
|
||||
@@ -0,0 +1 @@
|
||||
Unnamed repository; edit this file 'description' to name the repository.
|
||||
@@ -0,0 +1,7 @@
|
||||
# git ls-files --others --exclude-from=.git/info/exclude
|
||||
# Lines that start with '#' are comments.
|
||||
# For a project mostly in C, the following would be a good set of
|
||||
# exclude patterns (uncomment them if you want to use them):
|
||||
# *.[oa]
|
||||
# *~
|
||||
.DS_Store
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,2 @@
|
||||
x��A
|
||||
�0@Q�9��ɤ�4��c�L��!R"����~����H|��*x�\��2&��H1r��H
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,2 @@
|
||||
x��A
|
||||
�0@Q�9E��df�I"BW=�4N���R"����~�◵��[���wU��!z%�)U�0�$X#��P$d0������D�0�>D�dr13f, A�T�`���w��F{ƻ~�m�^��n�|ʜ1�3�s���T�?�i�:/���g8�
|
||||
@@ -0,0 +1,2 @@
|
||||
# pack-refs with: peeled fully-peeled sorted
|
||||
ea4a99ea801f54f1ec09a88a28c65eb4db5865aa refs/heads/master
|
||||
1
test/integration/pullRebaseInteractive/recording.json
Normal file
1
test/integration/pullRebaseInteractive/recording.json
Normal file
@@ -0,0 +1 @@
|
||||
{"KeyEvents":[{"Timestamp":1280,"Mod":0,"Key":256,"Ch":112},{"Timestamp":2032,"Mod":0,"Key":13,"Ch":13},{"Timestamp":2392,"Mod":0,"Key":13,"Ch":13},{"Timestamp":2640,"Mod":0,"Key":258,"Ch":0},{"Timestamp":2896,"Mod":0,"Key":256,"Ch":32},{"Timestamp":3384,"Mod":0,"Key":13,"Ch":13},{"Timestamp":4158,"Mod":0,"Key":256,"Ch":113}],"ResizeEvents":[{"Timestamp":0,"Width":272,"Height":74}]}
|
||||
52
test/integration/pullRebaseInteractive/setup.sh
Normal file
52
test/integration/pullRebaseInteractive/setup.sh
Normal file
@@ -0,0 +1,52 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
cd $1
|
||||
|
||||
git init
|
||||
|
||||
git config user.email "CI@example.com"
|
||||
git config user.name "CI"
|
||||
|
||||
echo test1 > myfile1
|
||||
git add .
|
||||
git commit -am "myfile1"
|
||||
echo test2 > myfile2
|
||||
git add .
|
||||
git commit -am "myfile2"
|
||||
echo test3 > myfile3
|
||||
git add .
|
||||
git commit -am "myfile3"
|
||||
echo test4 > myfile4
|
||||
git add .
|
||||
git commit -am "myfile4"
|
||||
|
||||
cd ..
|
||||
git clone --bare ./actual actual_remote
|
||||
|
||||
cd actual
|
||||
|
||||
git reset --hard HEAD~2
|
||||
|
||||
echo conflict > myfile4
|
||||
git add .
|
||||
git commit -am "myfile4 conflict"
|
||||
|
||||
echo test > myfile5
|
||||
git add .
|
||||
git commit -am "5"
|
||||
|
||||
echo test > myfile6
|
||||
git add .
|
||||
git commit -am "6"
|
||||
|
||||
echo test > myfile7
|
||||
git add .
|
||||
git commit -am "7"
|
||||
|
||||
git remote add origin ../actual_remote
|
||||
git fetch origin
|
||||
git branch --set-upstream-to=origin/master master
|
||||
|
||||
git config pull.rebase interactive
|
||||
1
test/integration/pullRebaseInteractive/test.json
Normal file
1
test/integration/pullRebaseInteractive/test.json
Normal file
@@ -0,0 +1 @@
|
||||
{ "description": "When user has configured pull with interactive rebase, ensure we handle conflicts", "speed": 5 }
|
||||
Reference in New Issue
Block a user