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 @@
|
||||
myfile4
|
||||
@@ -0,0 +1 @@
|
||||
dab77371cf53420955fc9baeb84303414f7e4a60 not-for-merge branch 'master' of ../actual_remote
|
||||
@@ -0,0 +1 @@
|
||||
ref: refs/heads/test
|
||||
@@ -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/*
|
||||
[push]
|
||||
default = nothing
|
||||
[branch "test"]
|
||||
remote = origin
|
||||
merge = refs/heads/test
|
||||
@@ -0,0 +1 @@
|
||||
Unnamed repository; edit this file 'description' to name the repository.
|
||||
BIN
test/integration/pushAndSetUpstream/expected/.git_keep/index
Normal file
BIN
test/integration/pushAndSetUpstream/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,5 @@
|
||||
0000000000000000000000000000000000000000 65c52315dc238c164b914369f49bd70882cc1d85 CI <CI@example.com> 1634897751 +1100 commit (initial): myfile1
|
||||
65c52315dc238c164b914369f49bd70882cc1d85 dab77371cf53420955fc9baeb84303414f7e4a60 CI <CI@example.com> 1634897751 +1100 commit: myfile2
|
||||
dab77371cf53420955fc9baeb84303414f7e4a60 dbd679941d871665b7ff70fffe6116725e56e270 CI <CI@example.com> 1634897751 +1100 commit: myfile3
|
||||
dbd679941d871665b7ff70fffe6116725e56e270 707a2a0835c897496934849bf6e0815593b140b3 CI <CI@example.com> 1634897751 +1100 commit: myfile4
|
||||
707a2a0835c897496934849bf6e0815593b140b3 707a2a0835c897496934849bf6e0815593b140b3 CI <CI@example.com> 1634897753 +1100 checkout: moving from master to test
|
||||
@@ -0,0 +1,4 @@
|
||||
0000000000000000000000000000000000000000 65c52315dc238c164b914369f49bd70882cc1d85 CI <CI@example.com> 1634897751 +1100 commit (initial): myfile1
|
||||
65c52315dc238c164b914369f49bd70882cc1d85 dab77371cf53420955fc9baeb84303414f7e4a60 CI <CI@example.com> 1634897751 +1100 commit: myfile2
|
||||
dab77371cf53420955fc9baeb84303414f7e4a60 dbd679941d871665b7ff70fffe6116725e56e270 CI <CI@example.com> 1634897751 +1100 commit: myfile3
|
||||
dbd679941d871665b7ff70fffe6116725e56e270 707a2a0835c897496934849bf6e0815593b140b3 CI <CI@example.com> 1634897751 +1100 commit: myfile4
|
||||
@@ -0,0 +1 @@
|
||||
0000000000000000000000000000000000000000 707a2a0835c897496934849bf6e0815593b140b3 CI <CI@example.com> 1634897753 +1100 branch: Created from master
|
||||
@@ -0,0 +1 @@
|
||||
0000000000000000000000000000000000000000 dab77371cf53420955fc9baeb84303414f7e4a60 CI <CI@example.com> 1634897751 +1100 fetch origin: storing head
|
||||
@@ -0,0 +1 @@
|
||||
0000000000000000000000000000000000000000 707a2a0835c897496934849bf6e0815593b140b3 CI <CI@example.com> 1634897754 +1100 update by push
|
||||
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 @@
|
||||
707a2a0835c897496934849bf6e0815593b140b3
|
||||
@@ -0,0 +1 @@
|
||||
707a2a0835c897496934849bf6e0815593b140b3
|
||||
@@ -0,0 +1 @@
|
||||
dab77371cf53420955fc9baeb84303414f7e4a60
|
||||
@@ -0,0 +1 @@
|
||||
707a2a0835c897496934849bf6e0815593b140b3
|
||||
1
test/integration/pushAndSetUpstream/expected/myfile1
Normal file
1
test/integration/pushAndSetUpstream/expected/myfile1
Normal file
@@ -0,0 +1 @@
|
||||
test1
|
||||
1
test/integration/pushAndSetUpstream/expected/myfile2
Normal file
1
test/integration/pushAndSetUpstream/expected/myfile2
Normal file
@@ -0,0 +1 @@
|
||||
test2
|
||||
1
test/integration/pushAndSetUpstream/expected/myfile3
Normal file
1
test/integration/pushAndSetUpstream/expected/myfile3
Normal file
@@ -0,0 +1 @@
|
||||
test3
|
||||
1
test/integration/pushAndSetUpstream/expected/myfile4
Normal file
1
test/integration/pushAndSetUpstream/expected/myfile4
Normal file
@@ -0,0 +1 @@
|
||||
test4
|
||||
1
test/integration/pushAndSetUpstream/expected_remote/HEAD
Normal file
1
test/integration/pushAndSetUpstream/expected_remote/HEAD
Normal file
@@ -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/pushAndSetUpstream/./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.
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 @@
|
||||
# pack-refs with: peeled fully-peeled sorted
|
||||
dab77371cf53420955fc9baeb84303414f7e4a60 refs/heads/master
|
||||
@@ -0,0 +1 @@
|
||||
707a2a0835c897496934849bf6e0815593b140b3
|
||||
1
test/integration/pushAndSetUpstream/recording.json
Normal file
1
test/integration/pushAndSetUpstream/recording.json
Normal file
@@ -0,0 +1 @@
|
||||
{"KeyEvents":[{"Timestamp":519,"Mod":0,"Key":259,"Ch":0},{"Timestamp":1101,"Mod":0,"Key":256,"Ch":110},{"Timestamp":1286,"Mod":0,"Key":256,"Ch":116},{"Timestamp":1382,"Mod":0,"Key":256,"Ch":101},{"Timestamp":1574,"Mod":0,"Key":256,"Ch":115},{"Timestamp":1613,"Mod":0,"Key":256,"Ch":116},{"Timestamp":1814,"Mod":0,"Key":13,"Ch":13},{"Timestamp":2430,"Mod":0,"Key":256,"Ch":80},{"Timestamp":2910,"Mod":0,"Key":13,"Ch":13},{"Timestamp":4149,"Mod":0,"Key":256,"Ch":113}],"ResizeEvents":[{"Timestamp":0,"Width":272,"Height":74}]}
|
||||
33
test/integration/pushAndSetUpstream/setup.sh
Normal file
33
test/integration/pushAndSetUpstream/setup.sh
Normal file
@@ -0,0 +1,33 @@
|
||||
#!/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
|
||||
|
||||
echo test3 > myfile3
|
||||
git add .
|
||||
git commit -am "myfile3"
|
||||
echo test4 > myfile4
|
||||
git add .
|
||||
git commit -am "myfile4"
|
||||
|
||||
git remote add origin ../actual_remote
|
||||
git fetch origin
|
||||
git config push.default nothing
|
||||
1
test/integration/pushAndSetUpstream/test.json
Normal file
1
test/integration/pushAndSetUpstream/test.json
Normal file
@@ -0,0 +1 @@
|
||||
{ "description": "push changes to the remote, setting upstream", "speed": 10 }
|
||||
Reference in New Issue
Block a user