Skip to content

Commit ddd20fc

Browse files
author
Ling Lo
committed
git: worktree, fix Restore/Reset on files bug
1 parent 8d2ac9e commit ddd20fc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

worktree.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -452,9 +452,9 @@ func (w *Worktree) resetWorktree(t *object.Tree, files []string) error {
452452
if len(files) > 0 {
453453
file := ""
454454
if ch.From != nil {
455-
file = ch.From.Name()
455+
file = ch.From.String()
456456
} else if ch.To != nil {
457-
file = ch.To.Name()
457+
file = ch.To.String()
458458
}
459459

460460
if file == "" {

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy