1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-02-07 13:42:01 +02:00

add another bisect integration test

This commit is contained in:
Jesse Duffield 2022-01-26 16:46:54 +11:00
parent 5e9cfab283
commit 5e6e1617aa
170 changed files with 293 additions and 3 deletions

View File

@ -166,7 +166,7 @@ func (self *BisectCommands) IsDone() (bool, []string, error) {
func (self *BisectCommands) ReachableFromStart(ref string, startRef string) bool {
err := self.cmd.New(
fmt.Sprintf("git merge-base --is-ancestor %s %s", startRef, ref),
).Run()
).DontLog().Run()
return err == nil
}

View File

@ -2,6 +2,7 @@ package integration
import (
"encoding/json"
"errors"
"fmt"
"io/ioutil"
"log"
@ -251,8 +252,8 @@ func createFixture(testPath, actualDir string) error {
bashScriptPath := filepath.Join(testPath, "setup.sh")
cmd := secureexec.Command("bash", bashScriptPath, actualDir)
if _, err := cmd.CombinedOutput(); err != nil {
return err
if output, err := cmd.CombinedOutput(); err != nil {
return errors.New(string(output))
}
return nil

View File

@ -1,5 +1,7 @@
#!/bin/sh
set -e
cd $1
git init

View File

@ -0,0 +1 @@
b9c5ec23f6a30f26f7a742f01b8bbac17a5daf35

View File

@ -0,0 +1,8 @@
# bad: [96f59302fbb47e8abb38d110328500055c2eae8f] commit 18
# good: [064b01d296b5d0a6d829b2c6da812000909144a3] commit 13
git bisect start 'other~2' 'other~7'
# good: [545ee64d47536092ef63907a18995827a74fa77d] commit 15
git bisect good 545ee64d47536092ef63907a18995827a74fa77d
# good: [b9c5ec23f6a30f26f7a742f01b8bbac17a5daf35] commit 17
git bisect good b9c5ec23f6a30f26f7a742f01b8bbac17a5daf35
# first bad commit: [96f59302fbb47e8abb38d110328500055c2eae8f] commit 18

View File

@ -0,0 +1 @@
master

View File

@ -0,0 +1,2 @@
bad
good

View File

@ -0,0 +1 @@
commit 20

View File

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

View File

@ -0,0 +1,10 @@
[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
ignorecase = true
precomposeunicode = true
[user]
email = CI@example.com
name = CI

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,26 @@
0000000000000000000000000000000000000000 3e94c347542e28f329499237920a81240575a1f4 CI <CI@example.com> 1643175915 +1100 commit (initial): first commit
3e94c347542e28f329499237920a81240575a1f4 3e94c347542e28f329499237920a81240575a1f4 CI <CI@example.com> 1643175915 +1100 checkout: moving from master to other
3e94c347542e28f329499237920a81240575a1f4 787e69fd95b7075de9290439e54677d023ea92c7 CI <CI@example.com> 1643175915 +1100 commit: commit 1
787e69fd95b7075de9290439e54677d023ea92c7 847efa05018f2fbf9e8ad84c188829d9b7ebd4d5 CI <CI@example.com> 1643175915 +1100 commit: commit 2
847efa05018f2fbf9e8ad84c188829d9b7ebd4d5 d2022605750ce8c6d2fd703df624fc1e191b799a CI <CI@example.com> 1643175915 +1100 commit: commit 3
d2022605750ce8c6d2fd703df624fc1e191b799a 681e7676f6bd15140ad8d51345914d0b7fa69489 CI <CI@example.com> 1643175915 +1100 commit: commit 4
681e7676f6bd15140ad8d51345914d0b7fa69489 3df063bdb2fd238bdf7bda23290b7da497589258 CI <CI@example.com> 1643175915 +1100 commit: commit 5
3df063bdb2fd238bdf7bda23290b7da497589258 2d0d5709569edc32bd9ee891dc0645e7b7bf2061 CI <CI@example.com> 1643175915 +1100 commit: commit 6
2d0d5709569edc32bd9ee891dc0645e7b7bf2061 9fb4f649e21a553f671bbd33c2ab4c5958c4d1b5 CI <CI@example.com> 1643175915 +1100 commit: commit 7
9fb4f649e21a553f671bbd33c2ab4c5958c4d1b5 93feecfa069adae620503f0ea027c4d7d368efcc CI <CI@example.com> 1643175915 +1100 commit: commit 8
93feecfa069adae620503f0ea027c4d7d368efcc 41f9560c3e0f5f8be63b4aef08706e8fbe54e1d3 CI <CI@example.com> 1643175915 +1100 commit: commit 9
41f9560c3e0f5f8be63b4aef08706e8fbe54e1d3 d989cb769db41caf40f46f40aaa421568ee0d6bc CI <CI@example.com> 1643175915 +1100 commit: commit 10
d989cb769db41caf40f46f40aaa421568ee0d6bc f59b0d2e37845a8d46ee072354598e8246f98324 CI <CI@example.com> 1643175915 +1100 commit: commit 11
f59b0d2e37845a8d46ee072354598e8246f98324 304e25b1cbcd673476a98779d817b4d87feba619 CI <CI@example.com> 1643175915 +1100 commit: commit 12
304e25b1cbcd673476a98779d817b4d87feba619 064b01d296b5d0a6d829b2c6da812000909144a3 CI <CI@example.com> 1643175915 +1100 commit: commit 13
064b01d296b5d0a6d829b2c6da812000909144a3 72e695b433526c667e356788b961ebe192878531 CI <CI@example.com> 1643175915 +1100 commit: commit 14
72e695b433526c667e356788b961ebe192878531 545ee64d47536092ef63907a18995827a74fa77d CI <CI@example.com> 1643175915 +1100 commit: commit 15
545ee64d47536092ef63907a18995827a74fa77d be3e8df868feac07f915a39aaceb886aeca56442 CI <CI@example.com> 1643175915 +1100 commit: commit 16
be3e8df868feac07f915a39aaceb886aeca56442 b9c5ec23f6a30f26f7a742f01b8bbac17a5daf35 CI <CI@example.com> 1643175915 +1100 commit: commit 17
b9c5ec23f6a30f26f7a742f01b8bbac17a5daf35 96f59302fbb47e8abb38d110328500055c2eae8f CI <CI@example.com> 1643175915 +1100 commit: commit 18
96f59302fbb47e8abb38d110328500055c2eae8f 96095b64429648b96e25b3a02a5ccd43c61cafef CI <CI@example.com> 1643175915 +1100 commit: commit 19
96095b64429648b96e25b3a02a5ccd43c61cafef 0b148673b6c3595b97542fcd5b5e97a568ea26b0 CI <CI@example.com> 1643175915 +1100 commit: commit 20
0b148673b6c3595b97542fcd5b5e97a568ea26b0 3e94c347542e28f329499237920a81240575a1f4 CI <CI@example.com> 1643175915 +1100 checkout: moving from other to master
3e94c347542e28f329499237920a81240575a1f4 545ee64d47536092ef63907a18995827a74fa77d CI <CI@example.com> 1643175915 +1100 checkout: moving from master to 545ee64d47536092ef63907a18995827a74fa77d
545ee64d47536092ef63907a18995827a74fa77d b9c5ec23f6a30f26f7a742f01b8bbac17a5daf35 CI <CI@example.com> 1643175918 +1100 checkout: moving from 545ee64d47536092ef63907a18995827a74fa77d to b9c5ec23f6a30f26f7a742f01b8bbac17a5daf35
b9c5ec23f6a30f26f7a742f01b8bbac17a5daf35 3e94c347542e28f329499237920a81240575a1f4 CI <CI@example.com> 1643175923 +1100 checkout: moving from b9c5ec23f6a30f26f7a742f01b8bbac17a5daf35 to test

View File

@ -0,0 +1 @@
0000000000000000000000000000000000000000 3e94c347542e28f329499237920a81240575a1f4 CI <CI@example.com> 1643175915 +1100 commit (initial): first commit

View File

@ -0,0 +1,21 @@
0000000000000000000000000000000000000000 3e94c347542e28f329499237920a81240575a1f4 CI <CI@example.com> 1643175915 +1100 branch: Created from HEAD
3e94c347542e28f329499237920a81240575a1f4 787e69fd95b7075de9290439e54677d023ea92c7 CI <CI@example.com> 1643175915 +1100 commit: commit 1
787e69fd95b7075de9290439e54677d023ea92c7 847efa05018f2fbf9e8ad84c188829d9b7ebd4d5 CI <CI@example.com> 1643175915 +1100 commit: commit 2
847efa05018f2fbf9e8ad84c188829d9b7ebd4d5 d2022605750ce8c6d2fd703df624fc1e191b799a CI <CI@example.com> 1643175915 +1100 commit: commit 3
d2022605750ce8c6d2fd703df624fc1e191b799a 681e7676f6bd15140ad8d51345914d0b7fa69489 CI <CI@example.com> 1643175915 +1100 commit: commit 4
681e7676f6bd15140ad8d51345914d0b7fa69489 3df063bdb2fd238bdf7bda23290b7da497589258 CI <CI@example.com> 1643175915 +1100 commit: commit 5
3df063bdb2fd238bdf7bda23290b7da497589258 2d0d5709569edc32bd9ee891dc0645e7b7bf2061 CI <CI@example.com> 1643175915 +1100 commit: commit 6
2d0d5709569edc32bd9ee891dc0645e7b7bf2061 9fb4f649e21a553f671bbd33c2ab4c5958c4d1b5 CI <CI@example.com> 1643175915 +1100 commit: commit 7
9fb4f649e21a553f671bbd33c2ab4c5958c4d1b5 93feecfa069adae620503f0ea027c4d7d368efcc CI <CI@example.com> 1643175915 +1100 commit: commit 8
93feecfa069adae620503f0ea027c4d7d368efcc 41f9560c3e0f5f8be63b4aef08706e8fbe54e1d3 CI <CI@example.com> 1643175915 +1100 commit: commit 9
41f9560c3e0f5f8be63b4aef08706e8fbe54e1d3 d989cb769db41caf40f46f40aaa421568ee0d6bc CI <CI@example.com> 1643175915 +1100 commit: commit 10
d989cb769db41caf40f46f40aaa421568ee0d6bc f59b0d2e37845a8d46ee072354598e8246f98324 CI <CI@example.com> 1643175915 +1100 commit: commit 11
f59b0d2e37845a8d46ee072354598e8246f98324 304e25b1cbcd673476a98779d817b4d87feba619 CI <CI@example.com> 1643175915 +1100 commit: commit 12
304e25b1cbcd673476a98779d817b4d87feba619 064b01d296b5d0a6d829b2c6da812000909144a3 CI <CI@example.com> 1643175915 +1100 commit: commit 13
064b01d296b5d0a6d829b2c6da812000909144a3 72e695b433526c667e356788b961ebe192878531 CI <CI@example.com> 1643175915 +1100 commit: commit 14
72e695b433526c667e356788b961ebe192878531 545ee64d47536092ef63907a18995827a74fa77d CI <CI@example.com> 1643175915 +1100 commit: commit 15
545ee64d47536092ef63907a18995827a74fa77d be3e8df868feac07f915a39aaceb886aeca56442 CI <CI@example.com> 1643175915 +1100 commit: commit 16
be3e8df868feac07f915a39aaceb886aeca56442 b9c5ec23f6a30f26f7a742f01b8bbac17a5daf35 CI <CI@example.com> 1643175915 +1100 commit: commit 17
b9c5ec23f6a30f26f7a742f01b8bbac17a5daf35 96f59302fbb47e8abb38d110328500055c2eae8f CI <CI@example.com> 1643175915 +1100 commit: commit 18
96f59302fbb47e8abb38d110328500055c2eae8f 96095b64429648b96e25b3a02a5ccd43c61cafef CI <CI@example.com> 1643175915 +1100 commit: commit 19
96095b64429648b96e25b3a02a5ccd43c61cafef 0b148673b6c3595b97542fcd5b5e97a568ea26b0 CI <CI@example.com> 1643175915 +1100 commit: commit 20

View File

@ -0,0 +1 @@
0000000000000000000000000000000000000000 3e94c347542e28f329499237920a81240575a1f4 CI <CI@example.com> 1643175923 +1100 branch: Created from master

View File

@ -0,0 +1,2 @@
x��K
1]罤σ뙀�0+�ΡιtP0Ξ0Dπψfα\Φ£x”¬­=:ΨD‡Ύ«Ζ8U Ύ°�#MΚ�8{«)®Ε η(x³ρ®―‰0ΕL!ΈDaΞ‰ΤΕμG‘Ό�®Z Ώϋ}έaΉΑyΉ]υΓm{κIΦv;ώμ“�p΄Ρ�uDuύS�ωΰΠ|":j

View File

@ -0,0 +1,2 @@
xЌО;
В@@Qл¬bzAfЮs~ "¤К2Ю/(8&„\ѕ)\ЂнеW–ЦЭ…}3sJEIИg4 5U1F`¬њ¤F)± +mцкuц Yf,¬sf%@ЁћіТ№жX*мћЮэѕlnњЬeњnцЎ¶>н$K»єђОr¬!єcЮ{Э§єэЙЮҐб ZЦ<G

View File

@ -0,0 +1,3 @@
x�ÎA
1 @Q×=Eö‚4iÓNAD˜•ÇHÛë C�ï,<€ÛÏ[ü²ôþ€‰cSë´TO^¶**sʼnÉa
L91N Ѭ²ék@%K,G¶E§*µ­«-�o昒y�û²Á|ƒó|»êGúúÔSYú0x‡‘2­5{ݧ†þɼù2:

View File

@ -0,0 +1 @@
x+)JMU03c040031QHËĚIeH¸ĽéË’łńbćŻ(�v˙‹;wçT>·¬âŮÜGł7]ĽćěÝ­ą®<ęơ'=ÁBâ ˝

View File

@ -0,0 +1,2 @@
x�ŽA
à E»ö³/Gã¨J!«cÔ‘j‚…¿.z€®|Þ‡—·Ö0Ò©"`ˆMðƒâl*L±„Âl™3V�9]Ñfµó!¯)f'ÙØJlu5T=ûÉT�)¤4.ž]áj�âw¿o,+ÌËz“·ý)—¼µ+ M½‹èàŒ¨µëˆêò§þóƒúul;

View File

@ -0,0 +1 @@
x+)JMU03c040031QHֻּIeאש‎¡£םֺֿ•2�ƒ�´›�נ?‎Tg>T>·¬ג��G³7]¼זל�­¹®<ךֶ¡'=ֱGֶ »

View File

@ -0,0 +1 @@
x+)JMU03c040031QHËÌIe¸À2ño]ô¶_GÅì6Ú±•-x®/T>·¬âÙÜG³7]¼æìÝ­¹®<êÆ¡'=Á 5

View File

@ -0,0 +1,3 @@
x�ŽM
Â0]ço/È{Í?ºê1’ô
Æ–ÁãÛ…p;ÌÀ”µµG'‰îÔw€LŠ`aŠ×cÈ^‚Yb²¡8a,<¨-íxu2R£u\4¸Ú2œÎ&¡rðìjÆQÉ¢Uz÷ûºÓ4Ó8Í7|RÛž¸”µ]IœÑâmKgfuÐcªãOýç“°ú»:q

View File

@ -0,0 +1 @@
# pack-refs with: peeled fully-peeled sorted

View File

@ -0,0 +1 @@
96f59302fbb47e8abb38d110328500055c2eae8f

View File

@ -0,0 +1 @@
064b01d296b5d0a6d829b2c6da812000909144a3

View File

@ -0,0 +1 @@
545ee64d47536092ef63907a18995827a74fa77d

View File

@ -0,0 +1 @@
b9c5ec23f6a30f26f7a742f01b8bbac17a5daf35

View File

@ -0,0 +1 @@
3e94c347542e28f329499237920a81240575a1f4

View File

@ -0,0 +1 @@
0b148673b6c3595b97542fcd5b5e97a568ea26b0

View File

@ -0,0 +1 @@
3e94c347542e28f329499237920a81240575a1f4

View File

@ -0,0 +1 @@
{"KeyEvents":[{"Timestamp":611,"Mod":0,"Key":259,"Ch":0},{"Timestamp":754,"Mod":0,"Key":259,"Ch":0},{"Timestamp":947,"Mod":0,"Key":258,"Ch":0},{"Timestamp":1098,"Mod":0,"Key":258,"Ch":0},{"Timestamp":1202,"Mod":0,"Key":258,"Ch":0},{"Timestamp":1545,"Mod":0,"Key":256,"Ch":98},{"Timestamp":1865,"Mod":0,"Key":258,"Ch":0},{"Timestamp":2195,"Mod":0,"Key":13,"Ch":13},{"Timestamp":2905,"Mod":0,"Key":256,"Ch":98},{"Timestamp":3499,"Mod":0,"Key":258,"Ch":0},{"Timestamp":3866,"Mod":0,"Key":13,"Ch":13},{"Timestamp":5556,"Mod":0,"Key":27,"Ch":0},{"Timestamp":5835,"Mod":0,"Key":260,"Ch":0},{"Timestamp":6850,"Mod":0,"Key":256,"Ch":110},{"Timestamp":7091,"Mod":0,"Key":256,"Ch":116},{"Timestamp":7146,"Mod":0,"Key":256,"Ch":101},{"Timestamp":7401,"Mod":0,"Key":256,"Ch":115},{"Timestamp":7441,"Mod":0,"Key":256,"Ch":116},{"Timestamp":7858,"Mod":0,"Key":13,"Ch":13},{"Timestamp":9099,"Mod":0,"Key":256,"Ch":113}],"ResizeEvents":[{"Timestamp":0,"Width":272,"Height":74}]}

View File

@ -0,0 +1,27 @@
#!/bin/sh
set -e
cd $1
git init
git config user.email "CI@example.com"
git config user.name "CI"
touch myfile
git add myfile
git commit -m "first commit"
git checkout -b other
for i in {1..20}
do
echo "$i" > file
git add .
git commit -m "commit $i"
done
git checkout master
git bisect start other~2 other~7

View File

@ -0,0 +1,4 @@
{
"description": "Opening lazygit when bisect has been started from another branch. There's an issue where we don't reselect the current branch if we mark the current branch as bad so this test side-steps that problem",
"speed": 20
}

View File

@ -1,5 +1,7 @@
#!/bin/sh
set -e
cd $1
git init

View File

@ -1,5 +1,7 @@
#!/bin/sh
set -e
cd $1
git init

View File

@ -1,5 +1,7 @@
#!/bin/sh
set -e
cd $1
git init

View File

@ -1,5 +1,7 @@
#!/bin/sh
set -e
cd $1
git init

View File

@ -1,5 +1,7 @@
#!/bin/sh
set -e
cd $1
git init

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