Re: [PATCH 07/12] completion: simplify command stuff
- From
SZEDER Gábor <szeder@ira.uka.de>
- Date
- Apr 11, 2012, 23:01 UTC
- Message-ID
- <20120411230157.GV2289@goldbirke>
- In-Reply-To
- <CAMP44s3hYHxs2HZ59meEO=SU7gXuxU=m489LdxV38=7PDeDFdw@mail.gmail.com>
On Thu, Apr 12, 2012 at 01:21:17AM +0300, Felipe Contreras wrote:
Show 12 quoted lines
> 2012/4/12 SZEDER Gábor <szeder@ira.uka.de>: > > However, this change "promotes" the command (or cmd) variable from > > being just a variable in _git() to a variable that is used in other > > completion functions, too. Why not go one more step further, and > > denote this by adding a __git prefix (i.e. renaming the variable to > > __git_command)? > > After thinking more about it, and analyzing the next patches, I don't > think it makes sense to have such a variable; it's only used by > __git_complete_remote_or_refspec, and it would be easier to make it an > argument to that function; that would simplify this patch series a > lot.
You mean that _git_fetch() would call
__git_complete_remote_or_refspec "fetch"
while _git_pull() and _git_push() will pass "pull" and "push", respectively?
Best, Gábor