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<01><>A
<EFBFBD>0@Q<>9E<39><45>d:i<><11><>cf2A<32><41>R"x|{<04><><EFBFBD>x<EFBFBD><78><EFBFBD><EFBFBD>h8<68><38>̏<EFBFBD>5I<35>\<5C>Yr̀<72>D<>ؐj)4<>$<24><><EFBFBD>w{w<><04>H<>rL<72>e<><65><EFBFBD><EFBFBD><EFBFBD>!<16><>J<EFBFBD>?<3F><><EFBFBD>~^<5E>u^<5E><><EFBFBD><E5B6BD>k<EFBFBD>y<EFBFBD> M 0F<46><10>;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>!z:<3A>

View File

@@ -1 +0,0 @@
x<01><>Aj<41>0E<><45>)f_4<>*YJ!<21>c<><63><EFBFBD><03><1D> <09><>uo<75><6F>{<7B>ū[<5B>7<EFBFBD>)<29>7<EFBFBD><01><><EFBFBD><EFBFBD><EFBFBD> <0B><>s <13><>GK1<><31>2<EFBFBD><32><EFBFBD><1D>Q<EFBFBD>1<EFBFBD><31>\U<><55>Y<EFBFBD><59><EFBFBD>2<EFBFBD>ؼEU]<5D><1E> O[<5B><>.W:_<>_xI<49>q<EFBFBD>[<5B>$<24><>bb<02><>sn8<6E>1e<31>g><3E>͖Qq<51>AO<41>2:֤C鶒<43>BG[<5B>Ǻ<EFBFBD><C7BA>}<7D><><EFBFBD>/~<13>L<EFBFBD>

View File

@@ -1,2 +0,0 @@
x<01><>K<EFBFBD><4B>0<05><>)z?8<>gɂ0 d<>cH<63><48>8<10><><EFBFBD>@<40>?<3F>
<EFBFBD>{<

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 }