Re: [PATCH 2/2] completion: simplify _git_notes

2018-03-07 Thread Junio C Hamano
SZEDER Gábor writes: > That works fine, but this would work just as well and has one less > case arm: OK, I missed that "obvious optimization" opportunity. I agree that would work. > > diff --git a/contrib/completion/git-completion.bash >

Re: [PATCH 2/2] completion: simplify _git_notes

2018-03-06 Thread SZEDER Gábor
> SZEDER Gábor writes: > > > There is a minor behaviour change here, though. This > > > > prune,*) > > ;; > > > > case arm ensured that we don't list refs for 'git notes prune ', > > because it doesn't accept them (and then we take our usual fallback and > > let

Re: [PATCH 2/2] completion: simplify _git_notes

2018-03-06 Thread Junio C Hamano
SZEDER Gábor writes: > There is a minor behaviour change here, though. This > > prune,*) > ;; > > case arm ensured that we don't list refs for 'git notes prune ', > because it doesn't accept them (and then we take our usual fallback and > let Bash complete filenames;

Re: [PATCH 2/2] completion: simplify _git_notes

2018-03-03 Thread SZEDER Gábor
On Sat, Mar 3, 2018 at 10:23 AM, Nguyễn Thái Ngọc Duy wrote: > This also adds completion for 'git notes remove' with two options: > --ignore-missing and --stdin. > > For some strange reason, 'git notes undefined --' completes --ref > without even running

Re: [PATCH 2/2] completion: simplify _git_notes

2018-03-03 Thread SZEDER Gábor
On Sat, Mar 3, 2018 at 10:23 AM, Nguyễn Thái Ngọc Duy wrote: > This also adds completion for 'git notes remove' with two options: > --ignore-missing and --stdin. > > For some strange reason, 'git notes undefined --' completes --ref > without even running

[PATCH 2/2] completion: simplify _git_notes

2018-03-03 Thread Nguyễn Thái Ngọc Duy
This also adds completion for 'git notes remove' with two options: --ignore-missing and --stdin. For some strange reason, 'git notes undefined --' completes --ref without even running --git-completion-helper. But since this is an error case (and we're not doing anything destructive, it's probably