mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-11-23 16:22:24 +03:00
add tests for dealing with remotes
This commit is contained in:
@@ -0,0 +1 @@
|
||||
myfile4
|
||||
1
test/integration/pullMerge/expected/.git_keep/FETCH_HEAD
Normal file
1
test/integration/pullMerge/expected/.git_keep/FETCH_HEAD
Normal file
@@ -0,0 +1 @@
|
||||
7f157a65ec0c8d6cffce08d6768e6733939e75a1 branch 'master' of ../actual_remote
|
||||
1
test/integration/pullMerge/expected/.git_keep/HEAD
Normal file
1
test/integration/pullMerge/expected/.git_keep/HEAD
Normal file
@@ -0,0 +1 @@
|
||||
ref: refs/heads/master
|
||||
1
test/integration/pullMerge/expected/.git_keep/ORIG_HEAD
Normal file
1
test/integration/pullMerge/expected/.git_keep/ORIG_HEAD
Normal file
@@ -0,0 +1 @@
|
||||
2a0805355a8040f9eebfa2dbf70b8bc313d6f456
|
||||
18
test/integration/pullMerge/expected/.git_keep/config
Normal file
18
test/integration/pullMerge/expected/.git_keep/config
Normal 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
|
||||
@@ -0,0 +1 @@
|
||||
Unnamed repository; edit this file 'description' to name the repository.
|
||||
BIN
test/integration/pullMerge/expected/.git_keep/index
Normal file
BIN
test/integration/pullMerge/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
|
||||
7
test/integration/pullMerge/expected/.git_keep/logs/HEAD
Normal file
7
test/integration/pullMerge/expected/.git_keep/logs/HEAD
Normal file
@@ -0,0 +1,7 @@
|
||||
0000000000000000000000000000000000000000 7c0bda1656e7695870ed15839643564b0a9283a8 CI <CI@example.com> 1634896907 +1100 commit (initial): myfile1
|
||||
7c0bda1656e7695870ed15839643564b0a9283a8 5529eadf398ce89032744d5f4151000f07d70124 CI <CI@example.com> 1634896907 +1100 commit: myfile2
|
||||
5529eadf398ce89032744d5f4151000f07d70124 703e85166069a42b4254af06b68dffc159ea3f24 CI <CI@example.com> 1634896907 +1100 commit: myfile3
|
||||
703e85166069a42b4254af06b68dffc159ea3f24 7f157a65ec0c8d6cffce08d6768e6733939e75a1 CI <CI@example.com> 1634896907 +1100 commit: myfile4
|
||||
7f157a65ec0c8d6cffce08d6768e6733939e75a1 5529eadf398ce89032744d5f4151000f07d70124 CI <CI@example.com> 1634896907 +1100 reset: moving to head^^
|
||||
5529eadf398ce89032744d5f4151000f07d70124 2a0805355a8040f9eebfa2dbf70b8bc313d6f456 CI <CI@example.com> 1634896907 +1100 commit: myfile4
|
||||
2a0805355a8040f9eebfa2dbf70b8bc313d6f456 b10baba2f9d877322f94f8770e2e0c8ab1db6bcc CI <CI@example.com> 1634896908 +1100 pull --no-edit: Merge made by the 'recursive' strategy.
|
||||
@@ -0,0 +1,7 @@
|
||||
0000000000000000000000000000000000000000 7c0bda1656e7695870ed15839643564b0a9283a8 CI <CI@example.com> 1634896907 +1100 commit (initial): myfile1
|
||||
7c0bda1656e7695870ed15839643564b0a9283a8 5529eadf398ce89032744d5f4151000f07d70124 CI <CI@example.com> 1634896907 +1100 commit: myfile2
|
||||
5529eadf398ce89032744d5f4151000f07d70124 703e85166069a42b4254af06b68dffc159ea3f24 CI <CI@example.com> 1634896907 +1100 commit: myfile3
|
||||
703e85166069a42b4254af06b68dffc159ea3f24 7f157a65ec0c8d6cffce08d6768e6733939e75a1 CI <CI@example.com> 1634896907 +1100 commit: myfile4
|
||||
7f157a65ec0c8d6cffce08d6768e6733939e75a1 5529eadf398ce89032744d5f4151000f07d70124 CI <CI@example.com> 1634896907 +1100 reset: moving to head^^
|
||||
5529eadf398ce89032744d5f4151000f07d70124 2a0805355a8040f9eebfa2dbf70b8bc313d6f456 CI <CI@example.com> 1634896907 +1100 commit: myfile4
|
||||
2a0805355a8040f9eebfa2dbf70b8bc313d6f456 b10baba2f9d877322f94f8770e2e0c8ab1db6bcc CI <CI@example.com> 1634896908 +1100 pull --no-edit: Merge made by the 'recursive' strategy.
|
||||
@@ -0,0 +1 @@
|
||||
0000000000000000000000000000000000000000 7f157a65ec0c8d6cffce08d6768e6733939e75a1 CI <CI@example.com> 1634896907 +1100 fetch origin: storing head
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,2 @@
|
||||
x<01><>K
|
||||
<EFBFBD>0@]<5D><14>2<><32>$"BW=ƴ<>`<60><>R"<22><><EFBFBD><11>><1E>7<EFBFBD><37>-<2D>"<22>S<EFBFBD>U<EFBFBD>$P"W(E<>2<EFBFBD><eGT<47><54><EFBFBD><EFBFBD><EFBFBD>d6<64><36><EFBFBD>m<EFBFBD>a*<2A>Iq<> <09>`̞)<29>Haa<><61>d#<23><>Xw;<3B><>:<3A>w<EFBFBD>H۞z<DB9E><7A>v<EFBFBD>H><3E><>ɞ<01>A<EFBFBD><41><EFBFBD><EFBFBD><7F>}<7D><>Tg~j|9]
|
||||
Binary file not shown.
@@ -0,0 +1,3 @@
|
||||
x<01><>A
|
||||
<EFBFBD>0@Q<>9<EFBFBD><39><05>i<EFBFBD>I"BW=F<>L<EFBFBD><4C>!R"<22><><EFBFBD><11>~<1E><><EFBFBD><EFBFBD><0E>r<EFBFBD><72>*<2A>J<EFBFBD><4A>d<EFBFBD>QCaV
|
||||
R
|
||||
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 @@
|
||||
b10baba2f9d877322f94f8770e2e0c8ab1db6bcc
|
||||
@@ -0,0 +1 @@
|
||||
7f157a65ec0c8d6cffce08d6768e6733939e75a1
|
||||
1
test/integration/pullMerge/expected/myfile1
Normal file
1
test/integration/pullMerge/expected/myfile1
Normal file
@@ -0,0 +1 @@
|
||||
test1
|
||||
1
test/integration/pullMerge/expected/myfile2
Normal file
1
test/integration/pullMerge/expected/myfile2
Normal file
@@ -0,0 +1 @@
|
||||
test2
|
||||
1
test/integration/pullMerge/expected/myfile3
Normal file
1
test/integration/pullMerge/expected/myfile3
Normal file
@@ -0,0 +1 @@
|
||||
test3
|
||||
1
test/integration/pullMerge/expected/myfile4
Normal file
1
test/integration/pullMerge/expected/myfile4
Normal file
@@ -0,0 +1 @@
|
||||
test4
|
||||
1
test/integration/pullMerge/expected_remote/HEAD
Normal file
1
test/integration/pullMerge/expected_remote/HEAD
Normal file
@@ -0,0 +1 @@
|
||||
ref: refs/heads/master
|
||||
8
test/integration/pullMerge/expected_remote/config
Normal file
8
test/integration/pullMerge/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/pullMerge/./actual
|
||||
1
test/integration/pullMerge/expected_remote/description
Normal file
1
test/integration/pullMerge/expected_remote/description
Normal file
@@ -0,0 +1 @@
|
||||
Unnamed repository; edit this file 'description' to name the repository.
|
||||
7
test/integration/pullMerge/expected_remote/info/exclude
Normal file
7
test/integration/pullMerge/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.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,2 @@
|
||||
x<01><>K
|
||||
<EFBFBD>0@]<5D><14>2<><32>$"BW=ƴ<>`<60><>R"<22><><EFBFBD><11>><1E>7<EFBFBD><37>-<2D>"<22>S<EFBFBD>U<EFBFBD>$P"W(E<>2<EFBFBD><eGT<47><54><EFBFBD><EFBFBD><EFBFBD>d6<64><36><EFBFBD>m<EFBFBD>a*<2A>Iq<> <09>`̞)<29>Haa<><61>d#<23><>Xw;<3B><>:<3A>w<EFBFBD>H۞z<DB9E><7A>v<EFBFBD>H><3E><>ɞ<01>A<EFBFBD><41><EFBFBD><EFBFBD><7F>}<7D><>Tg~j|9]
|
||||
Binary file not shown.
@@ -0,0 +1,3 @@
|
||||
x<01><>A
|
||||
<EFBFBD>0@Q<>9<EFBFBD><39><05>i<EFBFBD>I"BW=F<>L<EFBFBD><4C>!R"<22><><EFBFBD><11>~<1E><><EFBFBD><EFBFBD><0E>r<EFBFBD><72>*<2A>J<EFBFBD><4A>d<EFBFBD>QCaV
|
||||
R
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
2
test/integration/pullMerge/expected_remote/packed-refs
Normal file
2
test/integration/pullMerge/expected_remote/packed-refs
Normal file
@@ -0,0 +1,2 @@
|
||||
# pack-refs with: peeled fully-peeled sorted
|
||||
7f157a65ec0c8d6cffce08d6768e6733939e75a1 refs/heads/master
|
||||
1
test/integration/pullMerge/recording.json
Normal file
1
test/integration/pullMerge/recording.json
Normal file
@@ -0,0 +1 @@
|
||||
{"KeyEvents":[{"Timestamp":537,"Mod":0,"Key":256,"Ch":112},{"Timestamp":1401,"Mod":0,"Key":256,"Ch":113}],"ResizeEvents":[{"Timestamp":0,"Width":272,"Height":74}]}
|
||||
40
test/integration/pullMerge/setup.sh
Normal file
40
test/integration/pullMerge/setup.sh
Normal 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 test4 > myfile4
|
||||
git add .
|
||||
git commit -am "myfile4"
|
||||
|
||||
git remote add origin ../actual_remote
|
||||
git fetch origin
|
||||
git branch --set-upstream-to=origin/master master
|
||||
|
||||
git config pull.rebase false
|
||||
1
test/integration/pullMerge/test.json
Normal file
1
test/integration/pullMerge/test.json
Normal file
@@ -0,0 +1 @@
|
||||
{ "description": "When user has configured pull with merge, ensure a merge commit is created upon pull", "speed": 10 }
|
||||
Reference in New Issue
Block a user