1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-08-06 11:02:41 +03:00

Fix the bug mentioned in the previous commit

This commit is contained in:
Stefan Haller
2025-03-24 15:29:03 +01:00
parent 61c56c7822
commit d2059df543
2 changed files with 2 additions and 4 deletions

View File

@@ -292,7 +292,8 @@ func (self *CommitFilesController) openCopyMenu() error {
func (self *CommitFilesController) checkout(node *filetree.CommitFileNode) error { func (self *CommitFilesController) checkout(node *filetree.CommitFileNode) error {
self.c.LogAction(self.c.Tr.Actions.CheckoutFile) self.c.LogAction(self.c.Tr.Actions.CheckoutFile)
if err := self.c.Git().WorkingTree.CheckoutFile(self.context().GetRef().RefName(), node.GetPath()); err != nil { _, to := self.context().GetFromAndToForDiff()
if err := self.c.Git().WorkingTree.CheckoutFile(to, node.GetPath()); err != nil {
return err return err
} }

View File

@@ -51,9 +51,6 @@ var CheckoutFileFromRangeSelectionOfCommits = NewIntegrationTest(NewIntegrationT
Equals("M file.txt"), Equals("M file.txt"),
) )
/* EXPECTED:
t.FileSystem().FileContent("file.txt", Equals("three\n")) t.FileSystem().FileContent("file.txt", Equals("three\n"))
ACTUAL: */
t.FileSystem().FileContent("file.txt", Equals("two\n"))
}, },
}) })