Skip to content

Commit

Permalink
git: restore - support --source
Browse files Browse the repository at this point in the history
  • Loading branch information
rsteube committed Oct 23, 2024
1 parent 50e3839 commit 84d3896
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions completers/git_completer/cmd/restore.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@ func init() {
if restoreCmd.Flag("staged").Changed {
return git.ActionChanges(git.ChangeOpts{Staged: true}).FilterArgs()
}

if f := restoreCmd.Flag("source"); f.Changed {
return git.ActionRefDiffs(f.Value.String())
}
return git.ActionChanges(git.ChangeOpts{Unstaged: true}).FilterArgs()
}),
)
Expand Down

0 comments on commit 84d3896

Please sign in to comment.