1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2024-11-24 08:52:21 +02:00

migrate reflog integration tests

This commit is contained in:
Jesse Duffield 2023-02-22 21:15:03 +11:00
parent f0572238cb
commit 22c10479d5
174 changed files with 227 additions and 517 deletions

View File

@ -47,7 +47,10 @@ var CherryPickConflicts = NewIntegrationTest(NewIntegrationTestArgs{
).
Press(keys.Commits.PasteCommits)
t.ExpectPopup().Alert().Title(Equals("Cherry-Pick")).Content(Contains("Are you sure you want to cherry-pick the copied commits onto this branch?")).Confirm()
t.ExpectPopup().Alert().
Title(Equals("Cherry-Pick")).
Content(Contains("Are you sure you want to cherry-pick the copied commits onto this branch?")).
Confirm()
t.ExpectPopup().Confirmation().
Title(Equals("Auto-merge failed")).

View File

@ -0,0 +1,55 @@
package reflog
import (
"github.com/jesseduffield/lazygit/pkg/config"
. "github.com/jesseduffield/lazygit/pkg/integration/components"
)
var Checkout = NewIntegrationTest(NewIntegrationTestArgs{
Description: "Checkout a reflog commit as a detached head",
ExtraCmdArgs: "",
Skip: false,
SetupConfig: func(config *config.AppConfig) {},
SetupRepo: func(shell *Shell) {
shell.EmptyCommit("one")
shell.EmptyCommit("two")
shell.EmptyCommit("three")
shell.HardReset("HEAD^^")
},
Run: func(t *TestDriver, keys config.KeybindingConfig) {
t.Views().ReflogCommits().
Focus().
Lines(
Contains("reset: moving to HEAD^^").IsSelected(),
Contains("commit: three"),
Contains("commit: two"),
Contains("commit (initial): one"),
).
SelectNextItem().
PressPrimaryAction().
Tap(func() {
t.ExpectPopup().Confirmation().
Title(Contains("checkout commit")).
Content(Contains("Are you sure you want to checkout this commit?")).
Confirm()
}).
TopLines(
Contains("checkout: moving from master to").IsSelected(),
Contains("reset: moving to HEAD^^"),
)
t.Views().Branches().
Lines(
Contains("(HEAD detached at").IsSelected(),
Contains("master"),
)
t.Views().Commits().
Focus().
Lines(
Contains("three").IsSelected(),
Contains("two"),
Contains("one"),
)
},
})

View File

@ -0,0 +1,50 @@
package reflog
import (
"github.com/jesseduffield/lazygit/pkg/config"
. "github.com/jesseduffield/lazygit/pkg/integration/components"
)
var CherryPick = NewIntegrationTest(NewIntegrationTestArgs{
Description: "Cherry pick a reflog commit",
ExtraCmdArgs: "",
Skip: false,
SetupConfig: func(config *config.AppConfig) {},
SetupRepo: func(shell *Shell) {
shell.EmptyCommit("one")
shell.EmptyCommit("two")
shell.EmptyCommit("three")
shell.HardReset("HEAD^^")
},
Run: func(t *TestDriver, keys config.KeybindingConfig) {
t.Views().ReflogCommits().
Focus().
Lines(
Contains("reset: moving to HEAD^^").IsSelected(),
Contains("commit: three"),
Contains("commit: two"),
Contains("commit (initial): one"),
).
SelectNextItem().
Press(keys.Commits.CherryPickCopy)
t.Views().Information().Content(Contains("1 commit copied"))
t.Views().Commits().
Focus().
Lines(
Contains("one").IsSelected(),
).
Press(keys.Commits.PasteCommits).
Tap(func() {
t.ExpectPopup().Alert().
Title(Equals("Cherry-Pick")).
Content(Contains("Are you sure you want to cherry-pick the copied commits onto this branch?")).
Confirm()
}).
Lines(
Contains("three").IsSelected(),
Contains("one"),
)
},
})

View File

@ -0,0 +1,64 @@
package reflog
import (
"github.com/jesseduffield/lazygit/pkg/config"
. "github.com/jesseduffield/lazygit/pkg/integration/components"
)
var Patch = NewIntegrationTest(NewIntegrationTestArgs{
Description: "Build a patch from a reflog commit and apply it",
ExtraCmdArgs: "",
Skip: false,
SetupConfig: func(config *config.AppConfig) {},
SetupRepo: func(shell *Shell) {
shell.EmptyCommit("one")
shell.EmptyCommit("two")
shell.CreateFileAndAdd("file1", "content1")
shell.CreateFileAndAdd("file2", "content2")
shell.Commit("three")
shell.HardReset("HEAD^^")
},
Run: func(t *TestDriver, keys config.KeybindingConfig) {
t.Views().ReflogCommits().
Focus().
Lines(
Contains("reset: moving to HEAD^^").IsSelected(),
Contains("commit: three"),
Contains("commit: two"),
Contains("commit (initial): one"),
).
SelectNextItem().
PressEnter()
t.Views().SubCommits().
IsFocused().
Lines(
Contains("three").IsSelected(),
Contains("two"),
Contains("one"),
).
PressEnter()
t.Views().CommitFiles().
IsFocused().
Lines(
Contains("file1").IsSelected(),
Contains("file2"),
).
PressPrimaryAction()
t.Views().Information().Content(Contains("building patch"))
t.Views().
CommitFiles().
Press(keys.Universal.CreatePatchOptionsMenu)
t.ExpectPopup().Menu().
Title(Equals("Patch Options")).
Select(MatchesRegexp(`apply patch$`)).Confirm()
t.Views().Files().Lines(
Contains("file1"),
)
},
})

View File

@ -0,0 +1,49 @@
package reflog
import (
"github.com/jesseduffield/lazygit/pkg/config"
. "github.com/jesseduffield/lazygit/pkg/integration/components"
)
var Reset = NewIntegrationTest(NewIntegrationTestArgs{
Description: "Hard reset to a reflog commit",
ExtraCmdArgs: "",
Skip: false,
SetupConfig: func(config *config.AppConfig) {},
SetupRepo: func(shell *Shell) {
shell.EmptyCommit("one")
shell.EmptyCommit("two")
shell.EmptyCommit("three")
shell.HardReset("HEAD^^")
},
Run: func(t *TestDriver, keys config.KeybindingConfig) {
t.Views().ReflogCommits().
Focus().
Lines(
Contains("reset: moving to HEAD^^").IsSelected(),
Contains("commit: three"),
Contains("commit: two"),
Contains("commit (initial): one"),
).
SelectNextItem().
Press(keys.Commits.ViewResetOptions).
Tap(func() {
t.ExpectPopup().Menu().
Title(Contains("reset to")).
Select(Contains("hard reset")).
Confirm()
}).
TopLines(
Contains("reset: moving to").IsSelected(),
Contains("reset: moving to HEAD^^"),
)
t.Views().Commits().
Focus().
Lines(
Contains("three").IsSelected(),
Contains("two"),
Contains("one"),
)
},
})

View File

@ -17,6 +17,7 @@ import (
"github.com/jesseduffield/lazygit/pkg/integration/tests/interactive_rebase"
"github.com/jesseduffield/lazygit/pkg/integration/tests/misc"
"github.com/jesseduffield/lazygit/pkg/integration/tests/patch_building"
"github.com/jesseduffield/lazygit/pkg/integration/tests/reflog"
"github.com/jesseduffield/lazygit/pkg/integration/tests/stash"
"github.com/jesseduffield/lazygit/pkg/integration/tests/submodule"
"github.com/jesseduffield/lazygit/pkg/integration/tests/sync"
@ -87,6 +88,10 @@ var tests = []*components.IntegrationTest{
misc.ConfirmOnQuit,
misc.InitialOpen,
patch_building.CopyPatchToClipboard,
reflog.Checkout,
reflog.CherryPick,
reflog.Patch,
reflog.Reset,
stash.Apply,
stash.ApplyPatch,
stash.CreateBranch,

View File

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

View File

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

View File

@ -1 +0,0 @@
Unnamed repository; edit this file 'description' to name the repository.

View File

@ -1,7 +0,0 @@
# 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

@ -1,10 +0,0 @@
0000000000000000000000000000000000000000 2b16e862b7fc2a6ce1e711e5e174bc2f08c0e001 CI <CI@example.com> 1617683558 +1000 commit (initial): file0
2b16e862b7fc2a6ce1e711e5e174bc2f08c0e001 9acb41da3b683497b3966135ccd64411b8ef698f CI <CI@example.com> 1617683558 +1000 commit: file1
9acb41da3b683497b3966135ccd64411b8ef698f 40e3ff58efe2f50bc70ab084aba687ffd56dcd38 CI <CI@example.com> 1617683558 +1000 commit: file2
40e3ff58efe2f50bc70ab084aba687ffd56dcd38 ced0c7ee1af3cd078a0bd940fa45e973dfd0f226 CI <CI@example.com> 1617683558 +1000 commit: file4
ced0c7ee1af3cd078a0bd940fa45e973dfd0f226 ced0c7ee1af3cd078a0bd940fa45e973dfd0f226 CI <CI@example.com> 1617683558 +1000 checkout: moving from master to branch2
ced0c7ee1af3cd078a0bd940fa45e973dfd0f226 fdc461cdae46cbcd0e8b6f33898b25a17ab36f32 CI <CI@example.com> 1617683558 +1000 commit: file4
fdc461cdae46cbcd0e8b6f33898b25a17ab36f32 37661793a793e075730b85b9c3b300195738fc63 CI <CI@example.com> 1617683558 +1000 commit: file4
37661793a793e075730b85b9c3b300195738fc63 10e005e1fa2db07721aa63cb048b87b7a2830b64 CI <CI@example.com> 1617683558 +1000 commit: file2
10e005e1fa2db07721aa63cb048b87b7a2830b64 fdc461cdae46cbcd0e8b6f33898b25a17ab36f32 CI <CI@example.com> 1617683563 +1000 checkout: moving from branch2 to fdc461cdae46cbcd0e8b
fdc461cdae46cbcd0e8b6f33898b25a17ab36f32 fdc461cdae46cbcd0e8b6f33898b25a17ab36f32 CI <CI@example.com> 1617683567 +1000 checkout: moving from fdc461cdae46cbcd0e8b6f33898b25a17ab36f32 to ma

View File

@ -1,4 +0,0 @@
0000000000000000000000000000000000000000 ced0c7ee1af3cd078a0bd940fa45e973dfd0f226 CI <CI@example.com> 1617683558 +1000 branch: Created from HEAD
ced0c7ee1af3cd078a0bd940fa45e973dfd0f226 fdc461cdae46cbcd0e8b6f33898b25a17ab36f32 CI <CI@example.com> 1617683558 +1000 commit: file4
fdc461cdae46cbcd0e8b6f33898b25a17ab36f32 37661793a793e075730b85b9c3b300195738fc63 CI <CI@example.com> 1617683558 +1000 commit: file4
37661793a793e075730b85b9c3b300195738fc63 10e005e1fa2db07721aa63cb048b87b7a2830b64 CI <CI@example.com> 1617683558 +1000 commit: file2

View File

@ -1 +0,0 @@
0000000000000000000000000000000000000000 fdc461cdae46cbcd0e8b6f33898b25a17ab36f32 CI <CI@example.com> 1617683567 +1000 branch: Created from fdc461c

View File

@ -1,4 +0,0 @@
0000000000000000000000000000000000000000 2b16e862b7fc2a6ce1e711e5e174bc2f08c0e001 CI <CI@example.com> 1617683558 +1000 commit (initial): file0
2b16e862b7fc2a6ce1e711e5e174bc2f08c0e001 9acb41da3b683497b3966135ccd64411b8ef698f CI <CI@example.com> 1617683558 +1000 commit: file1
9acb41da3b683497b3966135ccd64411b8ef698f 40e3ff58efe2f50bc70ab084aba687ffd56dcd38 CI <CI@example.com> 1617683558 +1000 commit: file2
40e3ff58efe2f50bc70ab084aba687ffd56dcd38 ced0c7ee1af3cd078a0bd940fa45e973dfd0f226 CI <CI@example.com> 1617683558 +1000 commit: file4

View File

@ -1,2 +0,0 @@
x�ÎM
Â0@a×9Eö‚L~&™‚ˆÐU�1If°ÐÚR"x|{·�oñ궮s·nð—~ˆX¤$Žb®œ}«KæB…¢¢Ï%±z³ó!ïn#HPE¯¥fà¹p¢¬Ú0µÚþô×vØq²÷qzÊ—×}‘[ÝÖ‡uÉåD‘ìÕ€9ë9ÕåOnt^$šùó:œ

View File

@ -1,2 +0,0 @@
x+)JMU03c040031QHヒフI5`ーアコイ燹ヨカwチ�w.ス��モ[H
矢y�5�来ミ(桍ァ ^-ンW(x9

View File

@ -1,2 +0,0 @@
xЌОK
В0FaЗYEж‚Ь<n’‚€РQ—q“ьБBkK‰атнњѕБ)ЫєО]›Б^ъи_2•КЎЖДYјчV8[Bp њ‹Ц©]ј».ЁT"`¤№R)&Ў\OM<c€®¶JНЪ дУ_ЫЎЗIЯЗй‰Ї¬ы‚[ЩЦ‡6БДђsТWCDк¬зTЗџ\µyЃW?Ь:¬

View File

@ -1 +0,0 @@
10e005e1fa2db07721aa63cb048b87b7a2830b64

View File

@ -1 +0,0 @@
fdc461cdae46cbcd0e8b6f33898b25a17ab36f32

View File

@ -1 +0,0 @@
ced0c7ee1af3cd078a0bd940fa45e973dfd0f226

View File

@ -1 +0,0 @@
test0

View File

@ -1 +0,0 @@
test1

View File

@ -1 +0,0 @@
test2

View File

@ -1,2 +0,0 @@
line one
line two

View File

@ -1 +0,0 @@
{"KeyEvents":[{"Timestamp":793,"Mod":0,"Key":259,"Ch":0},{"Timestamp":1160,"Mod":0,"Key":259,"Ch":0},{"Timestamp":2481,"Mod":0,"Key":256,"Ch":93},{"Timestamp":4009,"Mod":0,"Key":258,"Ch":0},{"Timestamp":4152,"Mod":0,"Key":258,"Ch":0},{"Timestamp":4536,"Mod":0,"Key":256,"Ch":32},{"Timestamp":5153,"Mod":0,"Key":13,"Ch":13},{"Timestamp":6537,"Mod":0,"Key":260,"Ch":0},{"Timestamp":7248,"Mod":0,"Key":256,"Ch":110},{"Timestamp":7767,"Mod":0,"Key":256,"Ch":109},{"Timestamp":8335,"Mod":0,"Key":256,"Ch":97},{"Timestamp":9168,"Mod":0,"Key":13,"Ch":13},{"Timestamp":10224,"Mod":0,"Key":256,"Ch":113}],"ResizeEvents":[{"Timestamp":0,"Width":272,"Height":74}]}

View File

@ -1,40 +0,0 @@
#!/bin/sh
set -e
cd $1
git init
git config user.email "CI@example.com"
git config user.name "CI"
echo test0 > file0
git add .
git commit -am file0
echo test1 > file1
git add .
git commit -am file1
echo test2 > file2
git add .
git commit -am file2
echo "line one" > file4
git add .
git commit -am file4
git checkout -b branch2
echo "line two" >> file4
git add .
git commit -am file4
echo "line three" >> file4
git add .
git commit -am file4
echo "line two" >> file2
git add .
git commit -am file2

View File

@ -1 +0,0 @@
{ "description": "checking out a commit in the reflog context", "speed": 10 }

View File

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

View File

@ -1 +0,0 @@
afeb127e4579981e4b852e8aabb44b07f2ea4e09

View File

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

View File

@ -1 +0,0 @@
Unnamed repository; edit this file 'description' to name the repository.

View File

@ -1,7 +0,0 @@
# 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

@ -1,12 +0,0 @@
0000000000000000000000000000000000000000 5a5a519752ffd367bbd85dfbc19e5b18d44d6223 CI <CI@example.com> 1617683609 +1000 commit (initial): file0
5a5a519752ffd367bbd85dfbc19e5b18d44d6223 713ec49844ebad06a5c98fd3c5ce1445f664c3c6 CI <CI@example.com> 1617683609 +1000 commit: file1
713ec49844ebad06a5c98fd3c5ce1445f664c3c6 e23253d1f81331e1c94a5a5f68e2d4cc1cbee2fd CI <CI@example.com> 1617683609 +1000 commit: file2
e23253d1f81331e1c94a5a5f68e2d4cc1cbee2fd afeb127e4579981e4b852e8aabb44b07f2ea4e09 CI <CI@example.com> 1617683609 +1000 commit: file4
afeb127e4579981e4b852e8aabb44b07f2ea4e09 afeb127e4579981e4b852e8aabb44b07f2ea4e09 CI <CI@example.com> 1617683609 +1000 checkout: moving from master to branch2
afeb127e4579981e4b852e8aabb44b07f2ea4e09 ac7b38400c8aed050f379f9643b953b9d428fda1 CI <CI@example.com> 1617683609 +1000 commit: file4
ac7b38400c8aed050f379f9643b953b9d428fda1 a955e641b00e7e896842122a3537c70476d7b4e0 CI <CI@example.com> 1617683609 +1000 commit: file4
a955e641b00e7e896842122a3537c70476d7b4e0 bc8891320172f4cfa3efd7bb8767a46daa200d79 CI <CI@example.com> 1617683609 +1000 commit: file2
bc8891320172f4cfa3efd7bb8767a46daa200d79 afeb127e4579981e4b852e8aabb44b07f2ea4e09 CI <CI@example.com> 1617683610 +1000 checkout: moving from branch2 to master
afeb127e4579981e4b852e8aabb44b07f2ea4e09 afeb127e4579981e4b852e8aabb44b07f2ea4e09 CI <CI@example.com> 1617683619 +1000 rebase -i (start): checkout HEAD
afeb127e4579981e4b852e8aabb44b07f2ea4e09 35bedc872b1ca9e026e51c4017416acba4b3d64b CI <CI@example.com> 1617683619 +1000 rebase -i (pick): file2
35bedc872b1ca9e026e51c4017416acba4b3d64b 35bedc872b1ca9e026e51c4017416acba4b3d64b CI <CI@example.com> 1617683619 +1000 rebase -i (finish): returning to refs/heads/master

View File

@ -1,4 +0,0 @@
0000000000000000000000000000000000000000 afeb127e4579981e4b852e8aabb44b07f2ea4e09 CI <CI@example.com> 1617683609 +1000 branch: Created from HEAD
afeb127e4579981e4b852e8aabb44b07f2ea4e09 ac7b38400c8aed050f379f9643b953b9d428fda1 CI <CI@example.com> 1617683609 +1000 commit: file4
ac7b38400c8aed050f379f9643b953b9d428fda1 a955e641b00e7e896842122a3537c70476d7b4e0 CI <CI@example.com> 1617683609 +1000 commit: file4
a955e641b00e7e896842122a3537c70476d7b4e0 bc8891320172f4cfa3efd7bb8767a46daa200d79 CI <CI@example.com> 1617683609 +1000 commit: file2

View File

@ -1,5 +0,0 @@
0000000000000000000000000000000000000000 5a5a519752ffd367bbd85dfbc19e5b18d44d6223 CI <CI@example.com> 1617683609 +1000 commit (initial): file0
5a5a519752ffd367bbd85dfbc19e5b18d44d6223 713ec49844ebad06a5c98fd3c5ce1445f664c3c6 CI <CI@example.com> 1617683609 +1000 commit: file1
713ec49844ebad06a5c98fd3c5ce1445f664c3c6 e23253d1f81331e1c94a5a5f68e2d4cc1cbee2fd CI <CI@example.com> 1617683609 +1000 commit: file2
e23253d1f81331e1c94a5a5f68e2d4cc1cbee2fd afeb127e4579981e4b852e8aabb44b07f2ea4e09 CI <CI@example.com> 1617683609 +1000 commit: file4
afeb127e4579981e4b852e8aabb44b07f2ea4e09 35bedc872b1ca9e026e51c4017416acba4b3d64b CI <CI@example.com> 1617683619 +1000 rebase -i (finish): refs/heads/master onto afeb127e4579981e4b852e8aabb44b07f2ea4e09

View File

@ -1,2 +0,0 @@
x}ÎM
Â0@a×9Eö‚d&“Ÿ¡«c’N°`m)<¾Ý¸uûø¯®Ë2w Œ§¾«Zò€ÍKà‰j@™2c ¢ä§$‰sÒ‹Nf“]_ÝJÓ˜”BbΠTr@Í"¥—ª�:6òî�u·Ãh¯Ãx×�,ÛS/u]n"¤˜}tlÏàœ3G=¦ºþçðã¦ÍOEórK9ª

View File

@ -1,2 +0,0 @@
x�ΝA
Β0@QΧ9Εμ™IΗID„®z�¤™`΅!¥Dπψφn?ώ�j];σ¥f@6�„¤�9Ρ=HΜd†c*\Π§\Ό+³wρΣίν€i†Η4ΏμλΎΩmiυ $d®„�ξ¬η¤Ϋ�ά•u3t?έ8+ψ

View File

@ -1,2 +0,0 @@
x��M
Β0F]ηΩ ’ΙΟ¤"BW=Ζ$™`΅±¥Dπψζςvοƒ—χΦΦ®�μ¥�"Ί��9SΞ†83Ϋβ°¦™B-N¬3θΙ£uπ)ﮀb°uS*S(γ$!ΑTΌ/h­Sόι―ύΤσΆοσς”/·c“[ήΫCBΔΙ΅!}c�λ�κς§®κΊ ¨ΗI9χ

View File

@ -1,2 +0,0 @@
x�ÎK
Â0FaÇYEæ‚äqó¡£.ãÞô/[J—o—àôð NÝZ[º¶Å]úè ªbêâ”r&"ÇAœAb„ �á}r^í|àÝ5Ïë(¤R²I™Y„HLš˜`ŠâOm‡F}Æ'¾Üö·ºµ‡¶Ñ¦˜}4E_­1F�õœêø“«yYAêÌþ:!

View File

@ -1,2 +0,0 @@
x+)JMU03c040031QHヒフI5`ーアコイ燹ヨカwチ�w.ス��モ[H
矢y�5�来ミ(桍ァ ^-ンW(x9

View File

@ -1 +0,0 @@
bc8891320172f4cfa3efd7bb8767a46daa200d79

View File

@ -1 +0,0 @@
35bedc872b1ca9e026e51c4017416acba4b3d64b

View File

@ -1,2 +0,0 @@
test2
line two

View File

@ -1 +0,0 @@
line one

View File

@ -1 +0,0 @@
{"KeyEvents":[{"Timestamp":574,"Mod":0,"Key":259,"Ch":0},{"Timestamp":829,"Mod":0,"Key":258,"Ch":0},{"Timestamp":1029,"Mod":0,"Key":256,"Ch":32},{"Timestamp":2773,"Mod":0,"Key":258,"Ch":0},{"Timestamp":4325,"Mod":0,"Key":259,"Ch":0},{"Timestamp":4933,"Mod":0,"Key":256,"Ch":93},{"Timestamp":6029,"Mod":0,"Key":258,"Ch":0},{"Timestamp":7524,"Mod":0,"Key":256,"Ch":99},{"Timestamp":8861,"Mod":0,"Key":256,"Ch":91},{"Timestamp":9613,"Mod":0,"Key":256,"Ch":118},{"Timestamp":9974,"Mod":0,"Key":13,"Ch":13},{"Timestamp":10837,"Mod":0,"Key":256,"Ch":113}],"ResizeEvents":[{"Timestamp":0,"Width":272,"Height":74}]}

View File

@ -1,40 +0,0 @@
#!/bin/sh
set -e
cd $1
git init
git config user.email "CI@example.com"
git config user.name "CI"
echo test0 > file0
git add .
git commit -am file0
echo test1 > file1
git add .
git commit -am file1
echo test2 > file2
git add .
git commit -am file2
echo "line one" > file4
git add .
git commit -am file4
git checkout -b branch2
echo "line two" >> file4
git add .
git commit -am file4
echo "line three" >> file4
git add .
git commit -am file4
echo "line two" >> file2
git add .
git commit -am file2

View File

@ -1 +0,0 @@
{ "description": "cherry-picking a commit from the reflog context", "speed": 10 }

View File

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

View File

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

View File

@ -1 +0,0 @@
Unnamed repository; edit this file 'description' to name the repository.

View File

@ -1,7 +0,0 @@
# 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

@ -1,9 +0,0 @@
0000000000000000000000000000000000000000 a6cc56fedc3f0fc234dcacef1f1de2706c32c44b CI <CI@example.com> 1617683727 +1000 commit (initial): file0
a6cc56fedc3f0fc234dcacef1f1de2706c32c44b 7d61d1707885895d92f021111196df4466347327 CI <CI@example.com> 1617683727 +1000 commit: file1
7d61d1707885895d92f021111196df4466347327 c54d82926c7b673499d675aec8732cfe08aed761 CI <CI@example.com> 1617683727 +1000 commit: file2
c54d82926c7b673499d675aec8732cfe08aed761 445557afd2775df735bc53b891678e6bd9072638 CI <CI@example.com> 1617683727 +1000 commit: file4
445557afd2775df735bc53b891678e6bd9072638 445557afd2775df735bc53b891678e6bd9072638 CI <CI@example.com> 1617683727 +1000 checkout: moving from master to branch2
445557afd2775df735bc53b891678e6bd9072638 756e436bdd05b965c967edc1929432917e3864cd CI <CI@example.com> 1617683727 +1000 commit: file4
756e436bdd05b965c967edc1929432917e3864cd 07e795700fa240713f5577867a45eb6f2071d856 CI <CI@example.com> 1617683727 +1000 commit: file4
07e795700fa240713f5577867a45eb6f2071d856 5326459d9a0c196b18cc31dc95f05c9a4e4462de CI <CI@example.com> 1617683728 +1000 commit: file2
5326459d9a0c196b18cc31dc95f05c9a4e4462de b0bf1c26d59a724c767948a6de15664bfc0c292f CI <CI@example.com> 1617683735 +1000 commit: asd

View File

@ -1,5 +0,0 @@
0000000000000000000000000000000000000000 445557afd2775df735bc53b891678e6bd9072638 CI <CI@example.com> 1617683727 +1000 branch: Created from HEAD
445557afd2775df735bc53b891678e6bd9072638 756e436bdd05b965c967edc1929432917e3864cd CI <CI@example.com> 1617683727 +1000 commit: file4
756e436bdd05b965c967edc1929432917e3864cd 07e795700fa240713f5577867a45eb6f2071d856 CI <CI@example.com> 1617683727 +1000 commit: file4
07e795700fa240713f5577867a45eb6f2071d856 5326459d9a0c196b18cc31dc95f05c9a4e4462de CI <CI@example.com> 1617683728 +1000 commit: file2
5326459d9a0c196b18cc31dc95f05c9a4e4462de b0bf1c26d59a724c767948a6de15664bfc0c292f CI <CI@example.com> 1617683735 +1000 commit: asd

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