1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-07-31 14:24:25 +03: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 @@
myfile4

View File

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

View File

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

View File

@ -0,0 +1 @@
a9848fd98935937cd7d3909023ed1b588ccd4bfb

View File

@ -0,0 +1,16 @@
[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

View File

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

Binary file not shown.

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,5 @@
0000000000000000000000000000000000000000 1fe60e6b7023a1b9751850f83ac5bda49ddd9278 CI <CI@example.com> 1634897551 +1100 commit (initial): myfile1
1fe60e6b7023a1b9751850f83ac5bda49ddd9278 66bd8d357f6226ec264478db3606bc1c4be87e63 CI <CI@example.com> 1634897551 +1100 commit: myfile2
66bd8d357f6226ec264478db3606bc1c4be87e63 a9848fd98935937cd7d3909023ed1b588ccd4bfb CI <CI@example.com> 1634897551 +1100 commit: myfile3
a9848fd98935937cd7d3909023ed1b588ccd4bfb 66bd8d357f6226ec264478db3606bc1c4be87e63 CI <CI@example.com> 1634897551 +1100 reset: moving to HEAD^
66bd8d357f6226ec264478db3606bc1c4be87e63 aed1af42535c9c6a27b9f660119452328fddd7cd CI <CI@example.com> 1634897551 +1100 commit: myfile4

View File

@ -0,0 +1,5 @@
0000000000000000000000000000000000000000 1fe60e6b7023a1b9751850f83ac5bda49ddd9278 CI <CI@example.com> 1634897551 +1100 commit (initial): myfile1
1fe60e6b7023a1b9751850f83ac5bda49ddd9278 66bd8d357f6226ec264478db3606bc1c4be87e63 CI <CI@example.com> 1634897551 +1100 commit: myfile2
66bd8d357f6226ec264478db3606bc1c4be87e63 a9848fd98935937cd7d3909023ed1b588ccd4bfb CI <CI@example.com> 1634897551 +1100 commit: myfile3
a9848fd98935937cd7d3909023ed1b588ccd4bfb 66bd8d357f6226ec264478db3606bc1c4be87e63 CI <CI@example.com> 1634897551 +1100 reset: moving to HEAD^
66bd8d357f6226ec264478db3606bc1c4be87e63 aed1af42535c9c6a27b9f660119452328fddd7cd CI <CI@example.com> 1634897551 +1100 commit: myfile4

View File

@ -0,0 +1,3 @@
0000000000000000000000000000000000000000 66bd8d357f6226ec264478db3606bc1c4be87e63 CI <CI@example.com> 1634897551 +1100 fetch origin: storing head
66bd8d357f6226ec264478db3606bc1c4be87e63 a9848fd98935937cd7d3909023ed1b588ccd4bfb CI <CI@example.com> 1634897551 +1100 update by push
a9848fd98935937cd7d3909023ed1b588ccd4bfb aed1af42535c9c6a27b9f660119452328fddd7cd CI <CI@example.com> 1634897553 +1100 update by push

View File

@ -0,0 +1,5 @@
x<01><>A
<EFBFBD>0@Ѯs<D1AE><73>JF'<27>E
<EFBFBD><FL&Tp<54>H
<EFBFBD><EFBFBD><EFBFBD><08>~<1E>TU<54>H|k<>X<>Tl<54><6C>2<>`<60><1C><>X<-<2D>g<EFBFBD><12><>L<EFBFBD><4C>w=`<60><>9<EFBFBD>/9<><39><EFBFBD><R<><11>{
<EFBFBD>w<0E><>h<EFBFBD><68><EFBFBD>5i<35>'7<>-<2D>&h~4<>,<2C>

View File

@ -0,0 +1,3 @@
x<01><>A
<EFBFBD>0@Q<>9<EFBFBD><39><05>$<24>I
"BW=F2<46>b<EFBFBD><62>R"<22><><EFBFBD><11>><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:<3A>]Dm<44><14>z<EFBFBD>9<06>^stRB<52>sf<73>2<EFBFBD><32><EFBFBD><EFBFBD>ly<6C>W<EFBFBD>Cj<43><>c<15>D1<44><31><EFBFBD>r*<2A><><EFBFBD>7<EFBFBD><37><1F><0E><04>q<EFBFBD><71>'<27><><EFBFBD>Y<>

View File

@ -0,0 +1 @@
aed1af42535c9c6a27b9f660119452328fddd7cd

View File

@ -0,0 +1 @@
aed1af42535c9c6a27b9f660119452328fddd7cd

View File

@ -0,0 +1 @@
test1

View File

@ -0,0 +1 @@
test2

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/forcePush/./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,5 @@
x<01><>A
<EFBFBD>0@Ѯs<D1AE><73>JF'<27>E
<EFBFBD><FL&Tp<54>H
<EFBFBD><EFBFBD><EFBFBD><08>~<1E>TU<54>H|k<>X<>Tl<54><6C>2<>`<60><1C><>X<-<2D>g<EFBFBD><12><>L<EFBFBD><4C>w=`<60><>9<EFBFBD>/9<><39><EFBFBD><R<><11>{
<EFBFBD>w<0E><>h<EFBFBD><68><EFBFBD>5i<35>'7<>-<2D>&h~4<>,<2C>

View File

@ -0,0 +1,3 @@
x<01><>A
<EFBFBD>0@Q<>9<EFBFBD><39><05>$<24>I
"BW=F2<46>b<EFBFBD><62>R"<22><><EFBFBD><11>><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:<3A>]Dm<44><14>z<EFBFBD>9<06>^stRB<52>sf<73>2<EFBFBD><32><EFBFBD><EFBFBD>ly<6C>W<EFBFBD>Cj<43><>c<15>D1<44><31><EFBFBD>r*<2A><><EFBFBD>7<EFBFBD><37><1F><0E><04>q<EFBFBD><71>'<27><><EFBFBD>Y<>

View File

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

View File

@ -0,0 +1 @@
aed1af42535c9c6a27b9f660119452328fddd7cd

View File

@ -0,0 +1 @@
{"KeyEvents":[{"Timestamp":1054,"Mod":0,"Key":256,"Ch":80},{"Timestamp":1736,"Mod":0,"Key":13,"Ch":13},{"Timestamp":2486,"Mod":0,"Key":256,"Ch":113}],"ResizeEvents":[{"Timestamp":0,"Width":272,"Height":74}]}

View File

@ -0,0 +1,39 @@
#!/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"
cd ..
git clone --bare ./actual actual_remote
cd actual
git remote add origin ../actual_remote
git fetch origin
git branch --set-upstream-to=origin/master master
echo test3 > myfile3
git add .
git commit -am "myfile3"
git push origin master
git reset --hard HEAD^
echo test4 > myfile4
git add .
git commit -am "myfile4"

View File

@ -0,0 +1 @@
{ "description": "force push with lease if required", "speed": 10 }

View File

@ -0,0 +1 @@
myfile4

View File

@ -0,0 +1 @@
6ad6c42187d356f4eab4f004cca17863746adec1 branch 'master' of ../actual_remote

View File

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

View File

@ -0,0 +1 @@
0c0f210a4e5ff3b58e4190501c2b755695f439fa

View File

@ -0,0 +1,16 @@
[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

View File

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

Binary file not shown.

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,6 @@
0000000000000000000000000000000000000000 003527daa0801470151d8f93140a02fc306fea00 CI <CI@example.com> 1634896904 +1100 commit (initial): myfile1
003527daa0801470151d8f93140a02fc306fea00 0c0f210a4e5ff3b58e4190501c2b755695f439fa CI <CI@example.com> 1634896904 +1100 commit: myfile2
0c0f210a4e5ff3b58e4190501c2b755695f439fa 336826e035e431ac94eca7f3cb6dd3fb072f7a5a CI <CI@example.com> 1634896904 +1100 commit: myfile3
336826e035e431ac94eca7f3cb6dd3fb072f7a5a 6ad6c42187d356f4eab4f004cca17863746adec1 CI <CI@example.com> 1634896904 +1100 commit: myfile4
6ad6c42187d356f4eab4f004cca17863746adec1 0c0f210a4e5ff3b58e4190501c2b755695f439fa CI <CI@example.com> 1634896904 +1100 reset: moving to head^^
0c0f210a4e5ff3b58e4190501c2b755695f439fa 6ad6c42187d356f4eab4f004cca17863746adec1 CI <CI@example.com> 1634896905 +1100 pull --no-edit: Fast-forward

View File

@ -0,0 +1,6 @@
0000000000000000000000000000000000000000 003527daa0801470151d8f93140a02fc306fea00 CI <CI@example.com> 1634896904 +1100 commit (initial): myfile1
003527daa0801470151d8f93140a02fc306fea00 0c0f210a4e5ff3b58e4190501c2b755695f439fa CI <CI@example.com> 1634896904 +1100 commit: myfile2
0c0f210a4e5ff3b58e4190501c2b755695f439fa 336826e035e431ac94eca7f3cb6dd3fb072f7a5a CI <CI@example.com> 1634896904 +1100 commit: myfile3
336826e035e431ac94eca7f3cb6dd3fb072f7a5a 6ad6c42187d356f4eab4f004cca17863746adec1 CI <CI@example.com> 1634896904 +1100 commit: myfile4
6ad6c42187d356f4eab4f004cca17863746adec1 0c0f210a4e5ff3b58e4190501c2b755695f439fa CI <CI@example.com> 1634896904 +1100 reset: moving to head^^
0c0f210a4e5ff3b58e4190501c2b755695f439fa 6ad6c42187d356f4eab4f004cca17863746adec1 CI <CI@example.com> 1634896905 +1100 pull --no-edit: Fast-forward

View File

@ -0,0 +1 @@
0000000000000000000000000000000000000000 6ad6c42187d356f4eab4f004cca17863746adec1 CI <CI@example.com> 1634896904 +1100 fetch origin: storing head

View File

@ -0,0 +1,2 @@
x<01><>A
<EFBFBD>0@Ѯs<D1AE><73>ʌN<CA8C>J\y<><79>L<EFBFBD><4C><EFBFBD>")<29><><EFBFBD>#t<>y<EFBFBD>S5[˥<><CBA5><EFBFBD>*<2A>`<60>e<08>3<EFBFBD><33><EFBFBD>쩋T^<5E><><EFBFBD>%<25>{<7B><EFBFBD><0E> <0C>i<1E><1B><><EFBFBD>-U{I<>>H@<40>+<11>;<3B>9i<39>'w<>+<2B><><EFBFBD>4<>,<2C>

View File

@ -0,0 +1,2 @@
x<01><>A
<EFBFBD>0@Q<>9E<39><45>d2<64>I"BW=<3D>4<EFBFBD>`<60><>R"<22><><EFBFBD><11>~<7E><EFBFBD><E297B5>[<5B>t껪<74><EABBAA>!<21> <0E>#Lh<02><>kdO<18><> f<>]_<>"r<><72><0E><12><>LZ$V,<13>3<EFBFBD><33>E_<45>1<><31><EFBFBD>u<EFBFBD><75>h<EFBFBD><68><78><D78F><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>FJ<46><4A>#{p<><1C><><EFBFBD><EFBFBD>'7<>[<5B><><EFBFBD><EFBFBD><01><>90

View File

@ -0,0 +1 @@
6ad6c42187d356f4eab4f004cca17863746adec1

View File

@ -0,0 +1 @@
6ad6c42187d356f4eab4f004cca17863746adec1

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/pull/./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,2 @@
x<01><>A
<EFBFBD>0@Ѯs<D1AE><73>ʌN<CA8C>J\y<><79>L<EFBFBD><4C><EFBFBD>")<29><><EFBFBD>#t<>y<EFBFBD>S5[˥<><CBA5><EFBFBD>*<2A>`<60>e<08>3<EFBFBD><33><EFBFBD>쩋T^<5E><><EFBFBD>%<25>{<7B><EFBFBD><0E> <0C>i<1E><1B><><EFBFBD>-U{I<>>H@<40>+<11>;<3B>9i<39>'w<>+<2B><><EFBFBD>4<>,<2C>

View File

@ -0,0 +1,2 @@
x<01><>A
<EFBFBD>0@Q<>9E<39><45>d2<64>I"BW=<3D>4<EFBFBD>`<60><>R"<22><><EFBFBD><11>~<7E><EFBFBD><E297B5>[<5B>t껪<74><EABBAA>!<21> <0E>#Lh<02><>kdO<18><> f<>]_<>"r<><72><0E><12><>LZ$V,<13>3<EFBFBD><33>E_<45>1<><31><EFBFBD>u<EFBFBD><75>h<EFBFBD><68><78><D78F><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>FJ<46><4A>#{p<><1C><><EFBFBD><EFBFBD>'7<>[<5B><><EFBFBD><EFBFBD><01><>90

View File

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

View File

@ -0,0 +1 @@
{"KeyEvents":[{"Timestamp":618,"Mod":0,"Key":256,"Ch":112},{"Timestamp":1225,"Mod":0,"Key":256,"Ch":113}],"ResizeEvents":[{"Timestamp":0,"Width":272,"Height":74}]}

View File

@ -0,0 +1,34 @@
#!/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
# the test is to ensure that we actually can pull these two commits back from the origin
git reset --hard HEAD~2
git remote add origin ../actual_remote
git fetch origin
git branch --set-upstream-to=origin/master master

View File

@ -0,0 +1 @@
{ "description": "pull changes from the remote", "speed": 10 }

View File

@ -0,0 +1 @@
myfile4

View File

@ -0,0 +1 @@
7f157a65ec0c8d6cffce08d6768e6733939e75a1 branch 'master' of ../actual_remote

Some files were not shown because too many files have changed in this diff Show More