mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-02-25 18:55:28 -06:00
add tests for dealing with remotes
This commit is contained in:
@@ -0,0 +1 @@
|
||||
myfile4
|
||||
1
test/integration/forcePush/expected/.git_keep/FETCH_HEAD
Normal file
1
test/integration/forcePush/expected/.git_keep/FETCH_HEAD
Normal file
@@ -0,0 +1 @@
|
||||
a9848fd98935937cd7d3909023ed1b588ccd4bfb branch 'master' of ../actual_remote
|
||||
1
test/integration/forcePush/expected/.git_keep/HEAD
Normal file
1
test/integration/forcePush/expected/.git_keep/HEAD
Normal file
@@ -0,0 +1 @@
|
||||
ref: refs/heads/master
|
||||
1
test/integration/forcePush/expected/.git_keep/ORIG_HEAD
Normal file
1
test/integration/forcePush/expected/.git_keep/ORIG_HEAD
Normal file
@@ -0,0 +1 @@
|
||||
a9848fd98935937cd7d3909023ed1b588ccd4bfb
|
||||
16
test/integration/forcePush/expected/.git_keep/config
Normal file
16
test/integration/forcePush/expected/.git_keep/config
Normal 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
|
||||
@@ -0,0 +1 @@
|
||||
Unnamed repository; edit this file 'description' to name the repository.
|
||||
BIN
test/integration/forcePush/expected/.git_keep/index
Normal file
BIN
test/integration/forcePush/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
|
||||
5
test/integration/forcePush/expected/.git_keep/logs/HEAD
Normal file
5
test/integration/forcePush/expected/.git_keep/logs/HEAD
Normal 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
|
||||
@@ -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
|
||||
@@ -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
|
||||
Binary file not shown.
Binary file not shown.
@@ -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>
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -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<>
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1 @@
|
||||
aed1af42535c9c6a27b9f660119452328fddd7cd
|
||||
@@ -0,0 +1 @@
|
||||
aed1af42535c9c6a27b9f660119452328fddd7cd
|
||||
1
test/integration/forcePush/expected/myfile1
Normal file
1
test/integration/forcePush/expected/myfile1
Normal file
@@ -0,0 +1 @@
|
||||
test1
|
||||
1
test/integration/forcePush/expected/myfile2
Normal file
1
test/integration/forcePush/expected/myfile2
Normal file
@@ -0,0 +1 @@
|
||||
test2
|
||||
1
test/integration/forcePush/expected/myfile4
Normal file
1
test/integration/forcePush/expected/myfile4
Normal file
@@ -0,0 +1 @@
|
||||
test4
|
||||
1
test/integration/forcePush/expected_remote/HEAD
Normal file
1
test/integration/forcePush/expected_remote/HEAD
Normal file
@@ -0,0 +1 @@
|
||||
ref: refs/heads/master
|
||||
8
test/integration/forcePush/expected_remote/config
Normal file
8
test/integration/forcePush/expected_remote/config
Normal 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
|
||||
1
test/integration/forcePush/expected_remote/description
Normal file
1
test/integration/forcePush/expected_remote/description
Normal file
@@ -0,0 +1 @@
|
||||
Unnamed repository; edit this file 'description' to name the repository.
|
||||
7
test/integration/forcePush/expected_remote/info/exclude
Normal file
7
test/integration/forcePush/expected_remote/info/exclude
Normal 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
|
||||
Binary file not shown.
Binary file not shown.
@@ -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>
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -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<>
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
2
test/integration/forcePush/expected_remote/packed-refs
Normal file
2
test/integration/forcePush/expected_remote/packed-refs
Normal file
@@ -0,0 +1,2 @@
|
||||
# pack-refs with: peeled fully-peeled sorted
|
||||
66bd8d357f6226ec264478db3606bc1c4be87e63 refs/heads/master
|
||||
@@ -0,0 +1 @@
|
||||
aed1af42535c9c6a27b9f660119452328fddd7cd
|
||||
1
test/integration/forcePush/recording.json
Normal file
1
test/integration/forcePush/recording.json
Normal 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}]}
|
||||
39
test/integration/forcePush/setup.sh
Normal file
39
test/integration/forcePush/setup.sh
Normal 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"
|
||||
|
||||
1
test/integration/forcePush/test.json
Normal file
1
test/integration/forcePush/test.json
Normal file
@@ -0,0 +1 @@
|
||||
{ "description": "force push with lease if required", "speed": 10 }
|
||||
Reference in New Issue
Block a user