discard changes integration test

This commit is contained in:
Jesse Duffield 2022-12-24 16:46:01 +11:00
parent 7c7f7bf9b9
commit 5c11b1ecb7
64 changed files with 153 additions and 145 deletions

View file

@ -1,23 +0,0 @@
Merge branch 'conflict' into conflict_second
# Conflicts:
# added-them-changed-us.txt
# both-added.txt
# both-deleted.txt
# both-modded.txt
# changed-them-added-us.txt
# deleted-them.txt
# deleted-us.txt
#
# It looks like you may be committing a merge.
# If this is not correct, please remove the file
# /Users/jesseduffieldduffield/go/src/github.com/jesseduffield/lazygit/test/integration/discardFileChanges/actual/.git/MERGE_HEAD
# and try again.
# Please enter the commit message for your changes. Lines starting
# with '#' will be ignored, and an empty message aborts the commit.
#
# On branch conflict_second
# All conflicts fixed but you are still merging.
#

View file

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

View file

@ -1 +0,0 @@
11bdfc142c42c6ffaa904890ab61ec76262ec9ca

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,8 +0,0 @@
0000000000000000000000000000000000000000 98e834e9cdae1191de7fafb2b6f334bddd0793e8 CI <CI@example.com> 1617671344 +1000 commit (initial): one
98e834e9cdae1191de7fafb2b6f334bddd0793e8 9976d7948def8b082e9d20135d6a04624d711752 CI <CI@example.com> 1617671344 +1000 commit: both-deleted.txt renamed in added-them-changed-us.txt
9976d7948def8b082e9d20135d6a04624d711752 8c82faa1358ce6cddba19d59b2924cbcc5ef1c8e CI <CI@example.com> 1617671344 +1000 commit: two
8c82faa1358ce6cddba19d59b2924cbcc5ef1c8e 98e834e9cdae1191de7fafb2b6f334bddd0793e8 CI <CI@example.com> 1617671344 +1000 checkout: moving from conflict to conflict_second
98e834e9cdae1191de7fafb2b6f334bddd0793e8 c91b3b139ea108475c19839fcda3a4e33db4ccc9 CI <CI@example.com> 1617671344 +1000 commit: both-deleted.txt renamed in changed-them-added-us.txt
c91b3b139ea108475c19839fcda3a4e33db4ccc9 11bdfc142c42c6ffaa904890ab61ec76262ec9ca CI <CI@example.com> 1617671344 +1000 commit: three
11bdfc142c42c6ffaa904890ab61ec76262ec9ca 11bdfc142c42c6ffaa904890ab61ec76262ec9ca CI <CI@example.com> 1617671344 +1000 reset: moving to conflict_second
11bdfc142c42c6ffaa904890ab61ec76262ec9ca 854f08fa802293e0679d07771547fe9fe5d159e8 CI <CI@example.com> 1617671365 +1000 commit (merge): Merge branch 'conflict' into conflict_second

View file

@ -1,3 +0,0 @@
0000000000000000000000000000000000000000 98e834e9cdae1191de7fafb2b6f334bddd0793e8 CI <CI@example.com> 1617671344 +1000 commit (initial): one
98e834e9cdae1191de7fafb2b6f334bddd0793e8 9976d7948def8b082e9d20135d6a04624d711752 CI <CI@example.com> 1617671344 +1000 commit: both-deleted.txt renamed in added-them-changed-us.txt
9976d7948def8b082e9d20135d6a04624d711752 8c82faa1358ce6cddba19d59b2924cbcc5ef1c8e CI <CI@example.com> 1617671344 +1000 commit: two

View file

@ -1,4 +0,0 @@
0000000000000000000000000000000000000000 98e834e9cdae1191de7fafb2b6f334bddd0793e8 CI <CI@example.com> 1617671344 +1000 branch: Created from conflict
98e834e9cdae1191de7fafb2b6f334bddd0793e8 c91b3b139ea108475c19839fcda3a4e33db4ccc9 CI <CI@example.com> 1617671344 +1000 commit: both-deleted.txt renamed in changed-them-added-us.txt
c91b3b139ea108475c19839fcda3a4e33db4ccc9 11bdfc142c42c6ffaa904890ab61ec76262ec9ca CI <CI@example.com> 1617671344 +1000 commit: three
11bdfc142c42c6ffaa904890ab61ec76262ec9ca 854f08fa802293e0679d07771547fe9fe5d159e8 CI <CI@example.com> 1617671365 +1000 commit (merge): Merge branch 'conflict' into conflict_second

View file

@ -1,2 +0,0 @@
xŤÎA
Â0@Q×9Eöd:i“ˇ«cf2AÁŘR"x|{·źżxş¶öěh8őÝĚŹ¤5IĘ\‰YrĚ€˘DłŘ<C582>j)4Ŕ$<24>¸Ťw{wŻrLŁe¤Ş…Ł!‰ŞJŽ?ý±î~^üu^îöĺ¶˝ě˘k»y<C2BB> M 0F<>ęöçîúă »!z:ě

View file

@ -1 +0,0 @@
x<01>ŽAjÃ0E»ö)f_4*YJ!«c¤ùªÜ äøuoÐå{¼Å«[ï7£)¸ª€›‹” »Üs ¤ÈGK1ûê2Òð<C392>«Qž1û€\UÀœYš´2•ؼEU]Êó O[¶<>.W:_®_xIÜqª[ÿ$Žœbb½³sn8ì1eøg>”ÍQq‡AOö2:Ö¤C鶨BG[ÐǺÈú}Àóç/~ 

View file

@ -1,2 +0,0 @@
x<01>ŽKŠÃ0³Ö)z?8ègÉ0 d•cHêç8ÙÁé@Ž?Ê ²{<
ªêÖÚMÈz}<7D> ¤qd<04>èlpÞköa4ˆ ÉGԩؤ­N=òŽU(M˜œGªœaL2Œ8ç¹Øfç|af“äòKm§ó…NçËÞ¹=î8Ö­ý &†hº<68>~ŒÖZõ·G ¾ÄUÙdwø(o¡ž˜n+Õ%¯Wð Ú<>™û|=?<3F>ú¸XK.

View file

@ -1 +0,0 @@
8c82faa1358ce6cddba19d59b2924cbcc5ef1c8e

View file

@ -1 +0,0 @@
854f08fa802293e0679d07771547fe9fe5d159e8

View file

@ -1 +0,0 @@
renamed\nhaha

View file

@ -1 +0,0 @@
{"KeyEvents":[{"Timestamp":966,"Mod":0,"Key":256,"Ch":100},{"Timestamp":1564,"Mod":0,"Key":13,"Ch":13},{"Timestamp":2093,"Mod":0,"Key":256,"Ch":100},{"Timestamp":2621,"Mod":0,"Key":13,"Ch":13},{"Timestamp":3173,"Mod":0,"Key":256,"Ch":100},{"Timestamp":3652,"Mod":0,"Key":13,"Ch":13},{"Timestamp":4165,"Mod":0,"Key":256,"Ch":100},{"Timestamp":4629,"Mod":0,"Key":13,"Ch":13},{"Timestamp":5190,"Mod":0,"Key":256,"Ch":100},{"Timestamp":5686,"Mod":0,"Key":13,"Ch":13},{"Timestamp":6198,"Mod":0,"Key":256,"Ch":100},{"Timestamp":6733,"Mod":0,"Key":13,"Ch":13},{"Timestamp":7254,"Mod":0,"Key":256,"Ch":100},{"Timestamp":7789,"Mod":0,"Key":13,"Ch":13},{"Timestamp":8285,"Mod":0,"Key":256,"Ch":100},{"Timestamp":8773,"Mod":0,"Key":13,"Ch":13},{"Timestamp":9237,"Mod":0,"Key":256,"Ch":100},{"Timestamp":9725,"Mod":0,"Key":13,"Ch":13},{"Timestamp":10181,"Mod":0,"Key":256,"Ch":100},{"Timestamp":10653,"Mod":0,"Key":13,"Ch":13},{"Timestamp":11125,"Mod":0,"Key":256,"Ch":100},{"Timestamp":11621,"Mod":0,"Key":13,"Ch":13},{"Timestamp":12093,"Mod":0,"Key":256,"Ch":100},{"Timestamp":12565,"Mod":0,"Key":13,"Ch":13},{"Timestamp":13037,"Mod":0,"Key":256,"Ch":100},{"Timestamp":13509,"Mod":0,"Key":13,"Ch":13},{"Timestamp":13965,"Mod":0,"Key":256,"Ch":100},{"Timestamp":14461,"Mod":0,"Key":13,"Ch":13},{"Timestamp":14909,"Mod":0,"Key":256,"Ch":100},{"Timestamp":15382,"Mod":0,"Key":13,"Ch":13},{"Timestamp":15853,"Mod":0,"Key":256,"Ch":100},{"Timestamp":16325,"Mod":0,"Key":13,"Ch":13},{"Timestamp":16765,"Mod":0,"Key":256,"Ch":100},{"Timestamp":17222,"Mod":0,"Key":13,"Ch":13},{"Timestamp":17637,"Mod":0,"Key":256,"Ch":100},{"Timestamp":18077,"Mod":0,"Key":13,"Ch":13},{"Timestamp":20190,"Mod":0,"Key":256,"Ch":109},{"Timestamp":20447,"Mod":0,"Key":13,"Ch":13},{"Timestamp":21414,"Mod":0,"Key":256,"Ch":113}],"ResizeEvents":[{"Timestamp":0,"Width":127,"Height":23}]}

View file

@ -1,65 +0,0 @@
#!/bin/sh
# expecting an error so we're not setting this
# set -e
cd $1
git init
git config user.email "CI@example.com"
git config user.name "CI"
# common stuff
echo test > both-deleted.txt
git checkout -b conflict && git add both-deleted.txt
echo bothmodded > both-modded.txt && git add both-modded.txt
echo haha > deleted-them.txt && git add deleted-them.txt
echo haha2 > deleted-us.txt && git add deleted-us.txt
echo mod > modded.txt & git add modded.txt
echo mod > modded-staged.txt & git add modded-staged.txt
echo del > deleted.txt && git add deleted.txt
echo del > deleted-staged.txt && git add deleted-staged.txt
echo change-delete > change-delete.txt && git add change-delete.txt
echo delete-change > delete-change.txt && git add delete-change.txt
echo double-modded > double-modded.txt && git add double-modded.txt
echo "renamed\nhaha" > renamed.txt && git add renamed.txt
git commit -m one
# stuff on other branch
git branch conflict_second && git mv both-deleted.txt added-them-changed-us.txt
git commit -m "both-deleted.txt renamed in added-them-changed-us.txt"
echo blah > both-added.txt && git add both-added.txt
echo mod1 > both-modded.txt && git add both-modded.txt
rm deleted-them.txt && git add deleted-them.txt
echo modded > deleted-us.txt && git add deleted-us.txt
git commit -m "two"
# stuff on our branch
git checkout conflict_second
git mv both-deleted.txt changed-them-added-us.txt
git commit -m "both-deleted.txt renamed in changed-them-added-us.txt"
echo mod2 > both-modded.txt && git add both-modded.txt
echo blah2 > both-added.txt && git add both-added.txt
echo modded > deleted-them.txt && git add deleted-them.txt
rm deleted-us.txt && git add deleted-us.txt
git commit -m "three"
git reset --hard conflict_second
git merge conflict
echo "new" > new.txt
echo "new staged" > new-staged.txt && git add new-staged.txt
echo mod2 > modded.txt
echo mod2 > modded-staged.txt && git add modded-staged.txt
rm deleted.txt
rm deleted-staged.txt && git add deleted-staged.txt
echo change-delete2 > change-delete.txt && git add change-delete.txt
rm change-delete.txt
rm delete-change.txt && git add delete-change.txt
echo "changed" > delete-change.txt
echo "change1" > double-modded.txt && git add double-modded.txt
echo "change2" > double-modded.txt
echo before > added-changed.txt && git add added-changed.txt
echo after > added-changed.txt
rm renamed.txt && git add renamed.txt
echo "renamed\nhaha" > renamed2.txt && git add renamed2.txt

View file

@ -1 +0,0 @@
{ "description": "discard file changes for various kinds of situations (merge conflicts, etc). Skipped because it's failing on CI for some reason", "speed": 5, "skip": true }