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 }