Thread (83 messages) 83 messages, 9 authors, 2019-06-13

Re: [PATCH v1 10/11] completion: support restore

From: Duy Nguyen <hidden>
Date: 2019-03-11 15:23:21

On Sun, Mar 10, 2019 at 2:17 AM Elijah Newren [off-list ref] wrote:
On Fri, Mar 8, 2019 at 2:17 AM Nguyễn Thái Ngọc Duy [off-list ref] wrote:
quoted
Completion for restore is straightforward. We could still do better
though by give the list of just tracked files instead of all present
ones. But let's leave it for later.
s/give/giving/

I'm slightly worried that due to using --no-overlay mode by default in
restore, having tab-completion include untracked files increases the
risk of accidentally nuking the wrong file.  restore is a destructive
command anyway and should thus be used with care, so perhaps this
isn't a big deal, but I thought I'd mention it.
This makes me think about my "git restore :/" example, which does not
remove untracked files because its source is the index. But isn't it
inconsistent that we only remove untracked files with --source and
keep them without? Will that just confuse people more? Or did I just
forget to implement no-overlay mode for the index too?

Side note, to enable overlay mode again in git restore, maybe "git
restore --keep-untracked --source..." will be better than "git restore
--overlay --source..."
-- 
Duy
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help