1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-11-29 22:48:24 +02:00

add tests for dealing with remotes

This commit is contained in:
Jesse Duffield
2021-10-22 20:18:40 +11:00
parent 6388af70ac
commit 2008c39516
663 changed files with 1663 additions and 72 deletions

View File

@@ -0,0 +1,25 @@
Merge branch 'master' of ../actual_remote
# Conflicts:
# myfile4
#
# It looks like you may be committing a merge.
# If this is not correct, please remove the file
# /Users/jesseduffieldduffield/go/src/github.com/jesseduffield/lazygit/test/integration/pullMergeConflict/actual/.git/MERGE_HEAD
# and try again.
# Please enter the commit message for your changes. Lines starting
# with '#' will be ignored, and an empty message aborts the commit.
#
# On branch master
# Your branch and 'origin/master' have diverged,
# and have 1 and 2 different commits each, respectively.
# (use "git pull" to merge the remote branch into yours)
#
# All conflicts fixed but you are still merging.
#
# Changes to be committed:
# new file: myfile3
# modified: myfile4
#

View File

@@ -0,0 +1 @@
38699899bb94dfae74e3e55cf5bd6d92e6f3292a branch 'master' of ../actual_remote

View File

@@ -0,0 +1 @@
ref: refs/heads/master

View File

@@ -0,0 +1 @@
7dba68a0030313e27b8dd5da2076952629485f2d

View File

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

View File

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

View File

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

View File

@@ -0,0 +1,7 @@
0000000000000000000000000000000000000000 f0e8e7922de77a5ab20b924640c8b8435bae0b0b CI <CI@example.com> 1634896911 +1100 commit (initial): myfile1
f0e8e7922de77a5ab20b924640c8b8435bae0b0b ddf4b7fe8f45d07a181c2b57cc3434c982d3f4aa CI <CI@example.com> 1634896911 +1100 commit: myfile2
ddf4b7fe8f45d07a181c2b57cc3434c982d3f4aa 80f8aed01cdb61f9e94c6a53c39f400dfbcf05c9 CI <CI@example.com> 1634896911 +1100 commit: myfile3
80f8aed01cdb61f9e94c6a53c39f400dfbcf05c9 38699899bb94dfae74e3e55cf5bd6d92e6f3292a CI <CI@example.com> 1634896911 +1100 commit: myfile4
38699899bb94dfae74e3e55cf5bd6d92e6f3292a ddf4b7fe8f45d07a181c2b57cc3434c982d3f4aa CI <CI@example.com> 1634896911 +1100 reset: moving to head^^
ddf4b7fe8f45d07a181c2b57cc3434c982d3f4aa 7dba68a0030313e27b8dd5da2076952629485f2d CI <CI@example.com> 1634896911 +1100 commit: myfile4 conflict
7dba68a0030313e27b8dd5da2076952629485f2d 720c7e2dd34822d33cb24a0a3f0f4bdabf433500 CI <CI@example.com> 1634896916 +1100 commit (merge): Merge branch 'master' of ../actual_remote

View File

@@ -0,0 +1,7 @@
0000000000000000000000000000000000000000 f0e8e7922de77a5ab20b924640c8b8435bae0b0b CI <CI@example.com> 1634896911 +1100 commit (initial): myfile1
f0e8e7922de77a5ab20b924640c8b8435bae0b0b ddf4b7fe8f45d07a181c2b57cc3434c982d3f4aa CI <CI@example.com> 1634896911 +1100 commit: myfile2
ddf4b7fe8f45d07a181c2b57cc3434c982d3f4aa 80f8aed01cdb61f9e94c6a53c39f400dfbcf05c9 CI <CI@example.com> 1634896911 +1100 commit: myfile3
80f8aed01cdb61f9e94c6a53c39f400dfbcf05c9 38699899bb94dfae74e3e55cf5bd6d92e6f3292a CI <CI@example.com> 1634896911 +1100 commit: myfile4
38699899bb94dfae74e3e55cf5bd6d92e6f3292a ddf4b7fe8f45d07a181c2b57cc3434c982d3f4aa CI <CI@example.com> 1634896911 +1100 reset: moving to head^^
ddf4b7fe8f45d07a181c2b57cc3434c982d3f4aa 7dba68a0030313e27b8dd5da2076952629485f2d CI <CI@example.com> 1634896911 +1100 commit: myfile4 conflict
7dba68a0030313e27b8dd5da2076952629485f2d 720c7e2dd34822d33cb24a0a3f0f4bdabf433500 CI <CI@example.com> 1634896916 +1100 commit (merge): Merge branch 'master' of ../actual_remote

View File

@@ -0,0 +1 @@
0000000000000000000000000000000000000000 38699899bb94dfae74e3e55cf5bd6d92e6f3292a CI <CI@example.com> 1634896911 +1100 fetch origin: storing head

View File

@@ -0,0 +1,3 @@
x��A
�0@Q�9E���4�i"BW=F:�����D���#���ŗ�֥y�tj��'�PH�4!sL%D֞;
QJ�趲�����΀2O��5�p�AB6�m�(ٕw{��Fƻ~Jݞz���<r��9#�3"�;�1��O��ז���259�

View File

@@ -0,0 +1,2 @@
x��A
�0@Ѯs��JF�c��<ƘL���")���#t�y�S5[ ������S���5d"��9`'XZ��LEҽs�i���4�c�G���7��jO@�)D��pE�ޝ��4��;��uSt4M,�

View File

@@ -0,0 +1 @@
720c7e2dd34822d33cb24a0a3f0f4bdabf433500

View File

@@ -0,0 +1 @@
38699899bb94dfae74e3e55cf5bd6d92e6f3292a

View File

@@ -0,0 +1 @@
test1

View File

@@ -0,0 +1 @@
test2

View File

@@ -0,0 +1 @@
test3

View File

@@ -0,0 +1 @@
test4

View File

@@ -0,0 +1 @@
ref: refs/heads/master

View File

@@ -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/pullMergeConflict/./actual

View File

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

View File

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

View File

@@ -0,0 +1,3 @@
x��A
�0@Q�9E���4�i"BW=F:�����D���#���ŗ�֥y�tj��'�PH�4!sL%D֞;
QJ�趲�����΀2O��5�p�AB6�m�(ٕw{��Fƻ~Jݞz���<r��9#�3"�;�1��O��ז���259�

View File

@@ -0,0 +1,2 @@
x��A
�0@Ѯs��JF�c��<ƘL���")���#t�y�S5[ ������S���5d"��9`'XZ��LEҽs�i���4�c�G���7��jO@�)D��pE�ޝ��4��;��uSt4M,�

View File

@@ -0,0 +1,2 @@
# pack-refs with: peeled fully-peeled sorted
38699899bb94dfae74e3e55cf5bd6d92e6f3292a refs/heads/master

View File

@@ -0,0 +1 @@
{"KeyEvents":[{"Timestamp":1428,"Mod":0,"Key":256,"Ch":112},{"Timestamp":2571,"Mod":0,"Key":13,"Ch":13},{"Timestamp":3459,"Mod":0,"Key":13,"Ch":13},{"Timestamp":3852,"Mod":0,"Key":258,"Ch":0},{"Timestamp":4419,"Mod":0,"Key":256,"Ch":32},{"Timestamp":5267,"Mod":0,"Key":13,"Ch":13},{"Timestamp":6266,"Mod":0,"Key":256,"Ch":113}],"ResizeEvents":[{"Timestamp":0,"Width":272,"Height":74}]}

View File

@@ -0,0 +1,40 @@
#!/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"
git remote add origin ../actual_remote
git fetch origin
git branch --set-upstream-to=origin/master master
git config pull.rebase false

View File

@@ -0,0 +1 @@
{ "description": "When user has configured pull with merge, ensure we handle conflicts", "speed": 5 }