mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-07-31 14:24:25 +03:00
Fix the bug mentioned in the previous commit
This commit is contained in:
@ -292,7 +292,8 @@ func (self *CommitFilesController) openCopyMenu() error {
|
||||
|
||||
func (self *CommitFilesController) checkout(node *filetree.CommitFileNode) error {
|
||||
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
|
||||
}
|
||||
|
||||
|
@ -51,9 +51,6 @@ var CheckoutFileFromRangeSelectionOfCommits = NewIntegrationTest(NewIntegrationT
|
||||
Equals("M file.txt"),
|
||||
)
|
||||
|
||||
/* EXPECTED:
|
||||
t.FileSystem().FileContent("file.txt", Equals("three\n"))
|
||||
ACTUAL: */
|
||||
t.FileSystem().FileContent("file.txt", Equals("two\n"))
|
||||
},
|
||||
})
|
||||
|
Reference in New Issue
Block a user