mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-05-11 20:36:03 +02:00
Fix the bug mentioned in the previous commit
This commit is contained in:
parent
61c56c7822
commit
d2059df543
2 changed files with 2 additions and 4 deletions
|
@ -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"))
|
||||
},
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue