Repository: jesseduffield/lazygit (language: go)

Issue:
Amending merge commit results in merge conflicts
**Describe the bug**
Amending merge commit results in merge conflicts.

**To Reproduce**
Try to amend a merge commit by making changes then selecting merge commit in the commits panel and using the keyboard shortcut `A`

**Expected behavior**
The amend is successful without merge conflicts, seeing as the merge conflicts were already handled when the original merge commit was made.

**Screenshots**
Example using this repo where the latest commit is a merge commit: https://github.com/OliverJAsh/lazygit-amend-merge-test

https://user-images.githubusercontent.com/921609/189199590-264cc0d7-2dd9-4bff-bfa8-63dd6db83103.mov


**Version info:**
```sh-session
$ lazygit --version
commit=, build date=, build source=homebrew, version=0.35, os=darwin, arch=arm64

$ git --version
git version 2.37.3
```



Discussion / hints:

Fix patch:
diff --git a/pkg/commands/git_commands/rebase.go b/pkg/commands/git_commands/rebase.go
index 9a8f94618db..11c187f362d 100644
--- a/pkg/commands/git_commands/rebase.go
+++ b/pkg/commands/git_commands/rebase.go
@@ -255,7 +255,7 @@ func (self *RebaseCommands) SquashAllAboveFixupCommits(sha string) error {
 	return self.runSkipEditorCommand(
 		self.cmd.New(
 			fmt.Sprintf(
-				"git rebase --interactive --autostash --autosquash %s^",
+				"git rebase --interactive --rebase-merges --autostash --autosquash %s^",
 				sha,
 			),
 		),
diff --git a/pkg/integration/components/input.go b/pkg/integration/components/input.go
index 61c78e9eb33..61b0f771f9e 100644
--- a/pkg/integration/components/input.go
+++ b/pkg/integration/components/input.go
@@ -76,6 +76,12 @@ func (self *Input) Confirm() {
 	self.pressKey(self.keys.Universal.Confirm)
 }
 
+func (self *Input) ProceedWhenAsked(matcher *matcher) {
+	self.assert.InConfirm()
+	self.assert.MatchCurrentViewContent(matcher)
+	self.Confirm()
+}
+
 // i.e. same as Confirm
 func (self *Input) Enter() {
 	self.pressKey(self.keys.Universal.Confirm)
diff --git a/pkg/integration/components/shell.go b/pkg/integration/components/shell.go
index 458528be7b8..5f7fef350c2 100644
--- a/pkg/integration/components/shell.go
+++ b/pkg/integration/components/shell.go
@@ -63,6 +63,10 @@ func (s *Shell) Checkout(name string) *Shell {
 	return s.RunCommand("git checkout " + name)
 }
 
+func (s *Shell) Merge(name string) *Shell {
+	return s.RunCommand("git merge --commit --no-ff " + name)
+}
+
 func (s *Shell) GitAdd(path string) *Shell {
 	return s.RunCommand(fmt.Sprintf("git add \"%s\"", path))
 }


Test patch:
diff --git a/pkg/integration/tests/interactive_rebase/amend_merge.go b/pkg/integration/tests/interactive_rebase/amend_merge.go
new file mode 100644
index 00000000000..e01e79a780d
--- /dev/null
+++ b/pkg/integration/tests/interactive_rebase/amend_merge.go
@@ -0,0 +1,50 @@
+package interactive_rebase
+
+import (
+	"github.com/jesseduffield/lazygit/pkg/config"
+	. "github.com/jesseduffield/lazygit/pkg/integration/components"
+)
+
+var (
+	postMergeFileContent = "post merge file content"
+	postMergeFilename    = "post-merge-file"
+)
+
+var AmendMerge = NewIntegrationTest(NewIntegrationTestArgs{
+	Description:  "Amends a staged file to a merge commit.",
+	ExtraCmdArgs: "",
+	Skip:         false,
+	SetupConfig:  func(config *config.AppConfig) {},
+	SetupRepo: func(shell *Shell) {
+		shell.
+			NewBranch("development-branch").
+			CreateFileAndAdd("initial-file", "initial file content").
+			Commit("initial commit").
+			NewBranch("feature-branch"). // it's also checked out automatically
+			CreateFileAndAdd("new-feature-file", "new content").
+			Commit("new feature commit").
+			Checkout("development-branch").
+			Merge("feature-branch").
+			CreateFileAndAdd(postMergeFilename, postMergeFileContent)
+	},
+	Run: func(shell *Shell, input *Input, assert *Assert, keys config.KeybindingConfig) {
+		assert.CommitCount(3)
+
+		input.SwitchToCommitsWindow()
+		assert.CurrentViewName("commits")
+
+		mergeCommitMessage := "Merge branch 'feature-branch' into development-branch"
+		assert.MatchHeadCommitMessage(Contains(mergeCommitMessage))
+
+		input.PressKeys(keys.Commits.AmendToCommit)
+		input.ProceedWhenAsked(Contains("Are you sure you want to amend this commit with your staged files?"))
+
+		// assuring we haven't added a brand new commit
+		assert.CommitCount(3)
+		assert.MatchHeadCommitMessage(Contains(mergeCommitMessage))
+
+		// assuring the post-merge file shows up in the merge commit.
+		assert.MatchMainViewContent(Contains(postMergeFilename))
+		assert.MatchMainViewContent(Contains("++" + postMergeFileContent))
+	},
+})
diff --git a/pkg/integration/tests/tests.go b/pkg/integration/tests/tests.go
index eb2fd83fabf..d59177c7e0b 100644
--- a/pkg/integration/tests/tests.go
+++ b/pkg/integration/tests/tests.go
@@ -29,6 +29,7 @@ var tests = []*components.IntegrationTest{
 	branch.Rebase,
 	branch.RebaseAndDrop,
 	interactive_rebase.One,
+	interactive_rebase.AmendMerge,
 	custom_commands.Basic,
 	custom_commands.MultiplePrompts,
 	custom_commands.MenuFromCommand,
diff --git a/test/integration_new/interactive_rebase/amend_merge/expected/repo/.git_keep/COMMIT_EDITMSG b/test/integration_new/interactive_rebase/amend_merge/expected/repo/.git_keep/COMMIT_EDITMSG
new file mode 100644
index 00000000000..de6160af5c4
--- /dev/null
+++ b/test/integration_new/interactive_rebase/amend_merge/expected/repo/.git_keep/COMMIT_EDITMSG
@@ -0,0 +1,1 @@
+fixup! Merge branch 'feature-branch' into development-branch
diff --git a/test/integration_new/interactive_rebase/amend_merge/expected/repo/.git_keep/FETCH_HEAD b/test/integration_new/interactive_rebase/amend_merge/expected/repo/.git_keep/FETCH_HEAD
new file mode 100644
index 00000000000..e69de29bb2d
diff --git a/test/integration_new/interactive_rebase/amend_merge/expected/repo/.git_keep/HEAD b/test/integration_new/interactive_rebase/amend_merge/expected/repo/.git_keep/HEAD
new file mode 100644
index 00000000000..dbe0904e25d
--- /dev/null
+++ b/test/integration_new/interactive_rebase/amend_merge/expected/repo/.git_keep/HEAD
@@ -0,0 +1,1 @@
+ref: refs/heads/development-branch
diff --git a/test/integration_new/interactive_rebase/amend_merge/expected/repo/.git_keep/ORIG_HEAD b/test/integration_new/interactive_rebase/amend_merge/expected/repo/.git_keep/ORIG_HEAD
new file mode 100644
index 00000000000..4829a07d0fd
--- /dev/null
+++ b/test/integration_new/interactive_rebase/amend_merge/expected/repo/.git_keep/ORIG_HEAD
@@ -0,0 +1,1 @@
+7802c86c6ce62289e32aa13d0c85dc3f733195cb
diff --git a/test/integration_new/interactive_rebase/amend_merge/expected/repo/.git_keep/config b/test/integration_new/interactive_rebase/amend_merge/expected/repo/.git_keep/config
new file mode 100644
index 00000000000..8a748ce32a0
--- /dev/null
+++ b/test/integration_new/interactive_rebase/amend_merge/expected/repo/.git_keep/config
@@ -0,0 +1,12 @@
+[core]
+	repositoryformatversion = 0
+	filemode = true
+	bare = false
+	logallrefupdates = true
+	ignorecase = true
+	precomposeunicode = true
+[user]
+	email = CI@example.com
+	name = CI
+[commit]
+	gpgSign = false
diff --git a/test/integration_new/interactive_rebase/amend_merge/expected/repo/.git_keep/description b/test/integration_new/interactive_rebase/amend_merge/expected/repo/.git_keep/description
new file mode 100644
index 00000000000..498b267a8c7
--- /dev/null
+++ b/test/integration_new/interactive_rebase/amend_merge/expected/repo/.git_keep/description
@@ -0,0 +1,1 @@
+Unnamed repository; edit this file 'description' to name the repository.
diff --git a/test/integration_new/interactive_rebase/amend_merge/expected/repo/.git_keep/index b/test/integration_new/interactive_rebase/amend_merge/expected/repo/.git_keep/index
new file mode 100644
index 00000000000..01d1d03a330
Binary files /dev/null and b/test/integration_new/interactive_rebase/amend_merge/expected/repo/.git_keep/index differ
diff --git a/test/integration_new/interactive_rebase/amend_merge/expected/repo/.git_keep/info/exclude b/test/integration_new/interactive_rebase/amend_merge/expected/repo/.git_keep/info/exclude
new file mode 100644
index 00000000000..8e9f2071f5d
--- /dev/null
+++ b/test/integration_new/interactive_rebase/amend_merge/expected/repo/.git_keep/info/exclude
@@ -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
diff --git a/test/integration_new/interactive_rebase/amend_merge/expected/repo/.git_keep/logs/HEAD b/test/integration_new/interactive_rebase/amend_merge/expected/repo/.git_keep/logs/HEAD
new file mode 100644
index 00000000000..bf29df758a6
--- /dev/null
+++ b/test/integration_new/interactive_rebase/amend_merge/expected/repo/.git_keep/logs/HEAD
@@ -0,0 +1,12 @@
+0000000000000000000000000000000000000000 3ad14f8b4ed479f2fd9d8d4f7fe2a9913771b7f3 CI <CI@example.com> 1663440492 -0700	commit (initial): initial commit
+3ad14f8b4ed479f2fd9d8d4f7fe2a9913771b7f3 3ad14f8b4ed479f2fd9d8d4f7fe2a9913771b7f3 CI <CI@example.com> 1663440492 -0700	checkout: moving from development-branch to feature-branch
+3ad14f8b4ed479f2fd9d8d4f7fe2a9913771b7f3 d1c7801838f293fe8f4b49dae6b4919d0359e6e6 CI <CI@example.com> 1663440492 -0700	commit: new feature commit
+d1c7801838f293fe8f4b49dae6b4919d0359e6e6 3ad14f8b4ed479f2fd9d8d4f7fe2a9913771b7f3 CI <CI@example.com> 1663440492 -0700	checkout: moving from feature-branch to development-branch
+3ad14f8b4ed479f2fd9d8d4f7fe2a9913771b7f3 f68c5b48c653ca6ab23abd7606fe8fa8cc8d5b15 CI <CI@example.com> 1663440492 -0700	merge feature-branch: Merge made by the 'recursive' strategy.
+f68c5b48c653ca6ab23abd7606fe8fa8cc8d5b15 7802c86c6ce62289e32aa13d0c85dc3f733195cb CI <CI@example.com> 1663440493 -0700	commit: fixup! Merge branch 'feature-branch' into development-branch
+7802c86c6ce62289e32aa13d0c85dc3f733195cb 3ad14f8b4ed479f2fd9d8d4f7fe2a9913771b7f3 CI <CI@example.com> 1663440494 -0700	rebase (start): checkout f68c5b48c653ca6ab23abd7606fe8fa8cc8d5b15^
+3ad14f8b4ed479f2fd9d8d4f7fe2a9913771b7f3 d1c7801838f293fe8f4b49dae6b4919d0359e6e6 CI <CI@example.com> 1663440494 -0700	rebase: fast-forward
+d1c7801838f293fe8f4b49dae6b4919d0359e6e6 3ad14f8b4ed479f2fd9d8d4f7fe2a9913771b7f3 CI <CI@example.com> 1663440494 -0700	rebase (reset): 'onto'
+3ad14f8b4ed479f2fd9d8d4f7fe2a9913771b7f3 f68c5b48c653ca6ab23abd7606fe8fa8cc8d5b15 CI <CI@example.com> 1663440494 -0700	rebase: fast-forward
+f68c5b48c653ca6ab23abd7606fe8fa8cc8d5b15 f517de66e2a158d4a1d85246611cae9ca23a938d CI <CI@example.com> 1663440494 -0700	rebase (fixup): Merge branch 'feature-branch' into development-branch
+f517de66e2a158d4a1d85246611cae9ca23a938d f517de66e2a158d4a1d85246611cae9ca23a938d CI <CI@example.com> 1663440494 -0700	rebase (finish): returning to refs/heads/development-branch
diff --git a/test/integration_new/interactive_rebase/amend_merge/expected/repo/.git_keep/logs/refs/heads/development-branch b/test/integration_new/interactive_rebase/amend_merge/expected/repo/.git_keep/logs/refs/heads/development-branch
new file mode 100644
index 00000000000..c7353e0e386
--- /dev/null
+++ b/test/integration_new/interactive_rebase/amend_merge/expected/repo/.git_keep/logs/refs/heads/development-branch
@@ -0,0 +1,4 @@
+0000000000000000000000000000000000000000 3ad14f8b4ed479f2fd9d8d4f7fe2a9913771b7f3 CI <CI@example.com> 1663440492 -0700	commit (initial): initial commit
+3ad14f8b4ed479f2fd9d8d4f7fe2a9913771b7f3 f68c5b48c653ca6ab23abd7606fe8fa8cc8d5b15 CI <CI@example.com> 1663440492 -0700	merge feature-branch: Merge made by the 'recursive' strategy.
+f68c5b48c653ca6ab23abd7606fe8fa8cc8d5b15 7802c86c6ce62289e32aa13d0c85dc3f733195cb CI <CI@example.com> 1663440493 -0700	commit: fixup! Merge branch 'feature-branch' into development-branch
+7802c86c6ce62289e32aa13d0c85dc3f733195cb f517de66e2a158d4a1d85246611cae9ca23a938d CI <CI@example.com> 1663440494 -0700	rebase (finish): refs/heads/development-branch onto 3ad14f8b4ed479f2fd9d8d4f7fe2a9913771b7f3
diff --git a/test/integration_new/interactive_rebase/amend_merge/expected/repo/.git_keep/logs/refs/heads/feature-branch b/test/integration_new/interactive_rebase/amend_merge/expected/repo/.git_keep/logs/refs/heads/feature-branch
new file mode 100644
index 00000000000..2d2177acc2c
--- /dev/null
+++ b/test/integration_new/interactive_rebase/amend_merge/expected/repo/.git_keep/logs/refs/heads/feature-branch
@@ -0,0 +1,2 @@
+0000000000000000000000000000000000000000 3ad14f8b4ed479f2fd9d8d4f7fe2a9913771b7f3 CI <CI@example.com> 1663440492 -0700	branch: Created from HEAD
+3ad14f8b4ed479f2fd9d8d4f7fe2a9913771b7f3 d1c7801838f293fe8f4b49dae6b4919d0359e6e6 CI <CI@example.com> 1663440492 -0700	commit: new feature commit
diff --git a/test/integration_new/interactive_rebase/amend_merge/expected/repo/.git_keep/objects/34/9e7420fb0fcc3ff740eae5b9dc103a1261558e b/test/integration_new/interactive_rebase/amend_merge/expected/repo/.git_keep/objects/34/9e7420fb0fcc3ff740eae5b9dc103a1261558e
new file mode 100644
index 00000000000..5f350fcff76
Binary files /dev/null and b/test/integration_new/interactive_rebase/amend_merge/expected/repo/.git_keep/objects/34/9e7420fb0fcc3ff740eae5b9dc103a1261558e differ
diff --git a/test/integration_new/interactive_rebase/amend_merge/expected/repo/.git_keep/objects/3a/d14f8b4ed479f2fd9d8d4f7fe2a9913771b7f3 b/test/integration_new/interactive_rebase/amend_merge/expected/repo/.git_keep/objects/3a/d14f8b4ed479f2fd9d8d4f7fe2a9913771b7f3
new file mode 100644
index 00000000000..0ac8eaeca22
Binary files /dev/null and b/test/integration_new/interactive_rebase/amend_merge/expected/repo/.git_keep/objects/3a/d14f8b4ed479f2fd9d8d4f7fe2a9913771b7f3 differ
diff --git a/test/integration_new/interactive_rebase/amend_merge/expected/repo/.git_keep/objects/3f/891fb57220f67735a13cb5a65d27c8ad388030 b/test/integration_new/interactive_rebase/amend_merge/expected/repo/.git_keep/objects/3f/891fb57220f67735a13cb5a65d27c8ad388030
new file mode 100644
index 00000000000..057b302dc63
Binary files /dev/null and b/test/integration_new/interactive_rebase/amend_merge/expected/repo/.git_keep/objects/3f/891fb57220f67735a13cb5a65d27c8ad388030 differ
diff --git a/test/integration_new/interactive_rebase/amend_merge/expected/repo/.git_keep/objects/47/d2739ba2c34690248c8f91b84bb54e8936899a b/test/integration_new/interactive_rebase/amend_merge/expected/repo/.git_keep/objects/47/d2739ba2c34690248c8f91b84bb54e8936899a
new file mode 100644
index 00000000000..c416a87e05b
Binary files /dev/null and b/test/integration_new/interactive_rebase/amend_merge/expected/repo/.git_keep/objects/47/d2739ba2c34690248c8f91b84bb54e8936899a differ
diff --git a/test/integration_new/interactive_rebase/amend_merge/expected/repo/.git_keep/objects/63/e06ef6d5baa80461d12e953ee7e75444180d8f b/test/integration_new/interactive_rebase/amend_merge/expected/repo/.git_keep/objects/63/e06ef6d5baa80461d12e953ee7e75444180d8f
new file mode 100644
index 00000000000..21a235054c0
Binary files /dev/null and b/test/integration_new/interactive_rebase/amend_merge/expected/repo/.git_keep/objects/63/e06ef6d5baa80461d12e953ee7e75444180d8f differ
diff --git a/test/integration_new/interactive_rebase/amend_merge/expected/repo/.git_keep/objects/78/02c86c6ce62289e32aa13d0c85dc3f733195cb b/test/integration_new/interactive_rebase/amend_merge/expected/repo/.git_keep/objects/78/02c86c6ce62289e32aa13d0c85dc3f733195cb
new file mode 100644
index 00000000000..e994739424b
--- /dev/null
+++ b/test/integration_new/interactive_rebase/amend_merge/expected/repo/.git_keep/objects/78/02c86c6ce62289e32aa13d0c85dc3f733195cb
@@ -0,0 +1,2 @@
+x��Mj�0F��)���R$��J �,z��x�1D�r��kh���޷xTK�;.~��֍ݠ%k!�"�iF�y��h�f���j��K	�|v�����`1O1� �Q�|6^��o���
+����O,띿��o0!X�-u�Z����ͻ��������!7\�a�[��?`^z��|�k��_B���N�
\ No newline at end of file
diff --git a/test/integration_new/interactive_rebase/amend_merge/expected/repo/.git_keep/objects/7a/02580e6e6ba96ea8fb9c7ebad7d03d00ec0643 b/test/integration_new/interactive_rebase/amend_merge/expected/repo/.git_keep/objects/7a/02580e6e6ba96ea8fb9c7ebad7d03d00ec0643
new file mode 100644
index 00000000000..c30233de17a
Binary files /dev/null and b/test/integration_new/interactive_rebase/amend_merge/expected/repo/.git_keep/objects/7a/02580e6e6ba96ea8fb9c7ebad7d03d00ec0643 differ
diff --git a/test/integration_new/interactive_rebase/amend_merge/expected/repo/.git_keep/objects/7b/d422e3608d9bcfeef85748c90a5ec114fc2c17 b/test/integration_new/interactive_rebase/amend_merge/expected/repo/.git_keep/objects/7b/d422e3608d9bcfeef85748c90a5ec114fc2c17
new file mode 100644
index 00000000000..0b10fcf3ffe
Binary files /dev/null and b/test/integration_new/interactive_rebase/amend_merge/expected/repo/.git_keep/objects/7b/d422e3608d9bcfeef85748c90a5ec114fc2c17 differ
diff --git a/test/integration_new/interactive_rebase/amend_merge/expected/repo/.git_keep/objects/d1/c7801838f293fe8f4b49dae6b4919d0359e6e6 b/test/integration_new/interactive_rebase/amend_merge/expected/repo/.git_keep/objects/d1/c7801838f293fe8f4b49dae6b4919d0359e6e6
new file mode 100644
index 00000000000..abe014bbcd7
Binary files /dev/null and b/test/integration_new/interactive_rebase/amend_merge/expected/repo/.git_keep/objects/d1/c7801838f293fe8f4b49dae6b4919d0359e6e6 differ
diff --git a/test/integration_new/interactive_rebase/amend_merge/expected/repo/.git_keep/objects/f5/17de66e2a158d4a1d85246611cae9ca23a938d b/test/integration_new/interactive_rebase/amend_merge/expected/repo/.git_keep/objects/f5/17de66e2a158d4a1d85246611cae9ca23a938d
new file mode 100644
index 00000000000..3d42ec6406d
--- /dev/null
+++ b/test/integration_new/interactive_rebase/amend_merge/expected/repo/.git_keep/objects/f5/17de66e2a158d4a1d85246611cae9ca23a938d
@@ -0,0 +1,2 @@
+x���jAD�Wt�Hf��9@�"��9�-�fwFƟ�˱���^����m�	�et�,Gx6J��R��g��9�Z��I��9`�R�2Ȧ�YBfT�Q��XCe��b��{���?�����1�
+�p�X�:Ve�7�Ǹ���:�/��Nm�㵬퍴s�Yq4tT^�i_w��p~���'(���+i<:���@�e�T������yL?2#Y|
\ No newline at end of file
diff --git a/test/integration_new/interactive_rebase/amend_merge/expected/repo/.git_keep/objects/f6/8c5b48c653ca6ab23abd7606fe8fa8cc8d5b15 b/test/integration_new/interactive_rebase/amend_merge/expected/repo/.git_keep/objects/f6/8c5b48c653ca6ab23abd7606fe8fa8cc8d5b15
new file mode 100644
index 00000000000..72c90791a24
--- /dev/null
+++ b/test/integration_new/interactive_rebase/amend_merge/expected/repo/.git_keep/objects/f6/8c5b48c653ca6ab23abd7606fe8fa8cc8d5b15
@@ -0,0 +1,2 @@
+x���jC1DS߯�Ε�kiB�r����������C>?�����9�i�<����U!W�4&Gµ���)#5v��{����V�.b�}��*�ق		Z6��ǜ}��x�-���GS2��R4��Y\<�&MSy����|����M�ʼ�����+��"�Cptٹi_w���ħw�
+���]�`Zƣ��ඌD?��n���{L�r[Y�
\ No newline at end of file
diff --git a/test/integration_new/interactive_rebase/amend_merge/expected/repo/.git_keep/refs/heads/development-branch b/test/integration_new/interactive_rebase/amend_merge/expected/repo/.git_keep/refs/heads/development-branch
new file mode 100644
index 00000000000..8dec112d4c2
--- /dev/null
+++ b/test/integration_new/interactive_rebase/amend_merge/expected/repo/.git_keep/refs/heads/development-branch
@@ -0,0 +1,1 @@
+f517de66e2a158d4a1d85246611cae9ca23a938d
diff --git a/test/integration_new/interactive_rebase/amend_merge/expected/repo/.git_keep/refs/heads/feature-branch b/test/integration_new/interactive_rebase/amend_merge/expected/repo/.git_keep/refs/heads/feature-branch
new file mode 100644
index 00000000000..61eacdc31c2
--- /dev/null
+++ b/test/integration_new/interactive_rebase/amend_merge/expected/repo/.git_keep/refs/heads/feature-branch
@@ -0,0 +1,1 @@
+d1c7801838f293fe8f4b49dae6b4919d0359e6e6
diff --git a/test/integration_new/interactive_rebase/amend_merge/expected/repo/initial-file b/test/integration_new/interactive_rebase/amend_merge/expected/repo/initial-file
new file mode 100644
index 00000000000..7a02580e6e6
--- /dev/null
+++ b/test/integration_new/interactive_rebase/amend_merge/expected/repo/initial-file
@@ -0,0 +1,1 @@
+initial file content
\ No newline at end of file
diff --git a/test/integration_new/interactive_rebase/amend_merge/expected/repo/new-feature-file b/test/integration_new/interactive_rebase/amend_merge/expected/repo/new-feature-file
new file mode 100644
index 00000000000..47d2739ba2c
--- /dev/null
+++ b/test/integration_new/interactive_rebase/amend_merge/expected/repo/new-feature-file
@@ -0,0 +1,1 @@
+new content
\ No newline at end of file
diff --git a/test/integration_new/interactive_rebase/amend_merge/expected/repo/post-merge-file b/test/integration_new/interactive_rebase/amend_merge/expected/repo/post-merge-file
new file mode 100644
index 00000000000..63e06ef6d5b
--- /dev/null
+++ b/test/integration_new/interactive_rebase/amend_merge/expected/repo/post-merge-file
@@ -0,0 +1,1 @@
+post merge file content
\ No newline at end of file