1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-02-09 13:47:11 +02:00

add integration test for discarding old files

This commit is contained in:
Jesse Duffield 2022-01-09 14:04:49 +11:00
parent ceb927fec0
commit e5096e71ab
37 changed files with 79 additions and 0 deletions

View File

@ -231,6 +231,7 @@ func (gui *Gui) handleRewordCommit() error {
return gui.surfaceError(err)
}
// TODO: use the commit message panel here
return gui.prompt(promptOpts{
title: gui.Tr.LcRewordCommit,
initialContent: message,

View File

@ -0,0 +1 @@
twoFiles

View File

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

View File

@ -0,0 +1 @@
7880a9728615a4d196df39600a0c8c71b40d96d6

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,9 @@
0000000000000000000000000000000000000000 b7a702b642978f2a9b1af9c1c67b22127af78c92 CI <CI@example.com> 1641697108 +1100 commit (initial): file0
b7a702b642978f2a9b1af9c1c67b22127af78c92 7880a9728615a4d196df39600a0c8c71b40d96d6 CI <CI@example.com> 1641697108 +1100 commit: twoFiles
7880a9728615a4d196df39600a0c8c71b40d96d6 af6725ba23f43a286deff0747476d7874113df1e CI <CI@example.com> 1641697108 +1100 commit: file2
af6725ba23f43a286deff0747476d7874113df1e af6725ba23f43a286deff0747476d7874113df1e CI <CI@example.com> 1641697111 +1100 rebase: updating HEAD
af6725ba23f43a286deff0747476d7874113df1e b7a702b642978f2a9b1af9c1c67b22127af78c92 CI <CI@example.com> 1641697111 +1100 rebase -i (start): checkout b7a702b642978f2a9b1af9c1c67b22127af78c92
b7a702b642978f2a9b1af9c1c67b22127af78c92 7880a9728615a4d196df39600a0c8c71b40d96d6 CI <CI@example.com> 1641697111 +1100 rebase -i: fast-forward
7880a9728615a4d196df39600a0c8c71b40d96d6 d14505f281a54cda96fc5fb8cd4b4ee14bae6264 CI <CI@example.com> 1641697111 +1100 commit (amend): twoFiles
d14505f281a54cda96fc5fb8cd4b4ee14bae6264 225ad83faa797c1831a2bc956a21e2d472f21443 CI <CI@example.com> 1641697111 +1100 rebase -i (pick): file2
225ad83faa797c1831a2bc956a21e2d472f21443 225ad83faa797c1831a2bc956a21e2d472f21443 CI <CI@example.com> 1641697111 +1100 rebase -i (finish): returning to refs/heads/master

View File

@ -0,0 +1,4 @@
0000000000000000000000000000000000000000 b7a702b642978f2a9b1af9c1c67b22127af78c92 CI <CI@example.com> 1641697108 +1100 commit (initial): file0
b7a702b642978f2a9b1af9c1c67b22127af78c92 7880a9728615a4d196df39600a0c8c71b40d96d6 CI <CI@example.com> 1641697108 +1100 commit: twoFiles
7880a9728615a4d196df39600a0c8c71b40d96d6 af6725ba23f43a286deff0747476d7874113df1e CI <CI@example.com> 1641697108 +1100 commit: file2
af6725ba23f43a286deff0747476d7874113df1e 225ad83faa797c1831a2bc956a21e2d472f21443 CI <CI@example.com> 1641697111 +1100 rebase -i (finish): refs/heads/master onto b7a702b642978f2a9b1af9c1c67b22127af78c92

View File

@ -0,0 +1 @@
x��±j1DSßW¨„]iO+™ ®\åVÚD>s'C>?jÒ‡é†÷¦n½ çWz»™Ãd9±’VÐc\3{Z3VeÈæ…SÆD­.Ùí>œ´È~-âC£ >EµÖ€i&*'&Ä  í�‡ª%ªa›ZÔ¨*ÁG)LÃ"ÏqÛvw¹º÷Ëõl?ÒßöV·þá0Æ̈è^–ÙÎÃþ‰/Ÿw×å˜üÉÍ™írÜ~ìKò

View File

@ -0,0 +1,2 @@
x�ŽA
Â0E]ç³$“¦™DD„®zŒi2Á‚iK�Ðã›�{y»ÏûðâZÊ\Á �ê.è%xJ�å<¡A×2¶é †Éô6Gµñ.KÎŽL?±é²íØx—$gM¶áy²ˆ]Ê(Š?õ¹î0ŒpƇ\¶—\âZî€Î¢ „ˆpFÔZµµEUùSWó’ä€u�Âïöºþª Ï/1ê ÜZ@¼

View File

@ -0,0 +1,3 @@
x�ÎA
à @Ñ®=…ûB™‰qT(¥�UŽ1Ž# Ä& =~s„nñekméÓp釪�,R‹ó ^krÁåÌ©xrN*)…])Þì|è»Û#p
C$ô<LTªKÀ QæÊidøÓ_Ûa§ÙÞ§ù©_nûª7ÙÚÃ"�H) D{E0§žS]ÿÌM]V̈‘9n

View File

@ -0,0 +1,2 @@
x�ÍA
Â0Fa×9Å왉cÒ¡«#iþ`¡¡R"x|{·�Þ¼µ¶tÕSß\b6³’åC*ð�«Vö¹ToPSõ.}úkÛiœè>NO|S{¯¸Ì[{�•`Qx ³³;ê1éø“»º¬`÷Ü7+ò

View File

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

View File

@ -0,0 +1 @@
225ad83faa797c1831a2bc956a21e2d472f21443

View File

@ -0,0 +1 @@
test0

View File

@ -0,0 +1 @@
test1

View File

@ -0,0 +1 @@
test2

View File

@ -0,0 +1 @@
test3

View File

@ -0,0 +1 @@
{"KeyEvents":[{"Timestamp":635,"Mod":0,"Key":259,"Ch":0},{"Timestamp":899,"Mod":0,"Key":259,"Ch":0},{"Timestamp":1227,"Mod":0,"Key":258,"Ch":0},{"Timestamp":1571,"Mod":0,"Key":13,"Ch":13},{"Timestamp":1971,"Mod":0,"Key":258,"Ch":0},{"Timestamp":2322,"Mod":0,"Key":256,"Ch":100},{"Timestamp":2731,"Mod":0,"Key":13,"Ch":13},{"Timestamp":3707,"Mod":0,"Key":256,"Ch":113}],"ResizeEvents":[{"Timestamp":0,"Width":272,"Height":74}]}

View File

@ -0,0 +1,24 @@
#!/bin/sh
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
echo testZ > fileZ
git add .
git commit -am twoFiles
echo test2 > file2
git add .
git commit -am file2
echo test3 > file3
git add .

View File

@ -0,0 +1,4 @@
{
"description": "Discarding a single file from an old commit (does rebase in background to remove the file but retain the other one)",
"speed": 5
}