Re: [PATCH] [kernel] completion: silence "fatal: Not a git repository" error

2014-10-14 Thread Junio C Hamano
John Szakmeister writes: > On Tue, Oct 14, 2014 at 2:29 PM, Junio C Hamano wrote: > ... >> Hmph, do you mean this one? >> >> $ cd /var/tmp ;# not a git repository >> $ git checkout >> >> -> >> >> $ git checkout fatal: Not a git repository (or any of the parent >> directories): .git

Re: [PATCH] [kernel] completion: silence "fatal: Not a git repository" error

2014-10-14 Thread John Szakmeister
On Tue, Oct 14, 2014 at 2:29 PM, Junio C Hamano wrote: > John Szakmeister writes: > >> It is possible that a user is trying to run a git command and fail to realize >> that they are not in a git repository or working tree. When trying to >> complete >> an operation, __git_refs would fall to a d

Re: [PATCH] [kernel] completion: silence "fatal: Not a git repository" error

2014-10-14 Thread Junio C Hamano
John Szakmeister writes: > It is possible that a user is trying to run a git command and fail to realize > that they are not in a git repository or working tree. When trying to > complete > an operation, __git_refs would fall to a degenerate case and attempt to use > "git for-each-ref", which w

Re: [PATCH] [kernel] completion: silence "fatal: Not a git repository" error

2014-10-14 Thread John Szakmeister
On Tue, Oct 14, 2014 at 6:49 AM, John Szakmeister wrote: > It is possible that a user is trying to run a git command and fail to realize > that they are not in a git repository or working tree. When trying to > complete > an operation, __git_refs would fall to a degenerate case and attempt to us

[PATCH] [kernel] completion: silence "fatal: Not a git repository" error

2014-10-14 Thread John Szakmeister
It is possible that a user is trying to run a git command and fail to realize that they are not in a git repository or working tree. When trying to complete an operation, __git_refs would fall to a degenerate case and attempt to use "git for-each-ref", which would emit the error. Let's fix this b