git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] git-completion: Add git help completion for aliases

From
Erik Faye-Lund <kusmabite@gmail.com>
Date
Mar 22, 2011, 09:18 UTC
Message-ID
<AANLkTimg74nh5C74tTXNQeK1nZnQVhGfH=gh8t1Nwr4j@mail.gmail.com>
In-Reply-To
<AANLkTi=zbsNxLSCcWQorZCnRFuDPujqYzW7B0xJx2FHp@mail.gmail.com>
2011/3/22 Erik Faye-Lund <kusmabite@gmail.com>:
Show 35 quoted lines
> 2011/3/22 SZEDER Gábor <szeder@ira.uka.de>:
>> On Tue, Mar 22, 2011 at 12:53:43AM -0700, Junio C Hamano wrote:
>>> This is a constructive tangent but if we are going to run $(__git_aliases)
>>> every time we run _git_help, perhaps it would want a hack similar to the
>>> way the value for $__git_all_commands is generated just once?
>>
>> I think this is not necessary.  We already run __git_aliases() every
>> time after 'git <TAB>', and it was not an issue so far.  And indeed, I
>> just created 50 aliases, and the time required for __git_aliases()
>> seems to be negligible:
>>
>>  $ time __git_aliases
>>  <bunch of aliases>
>>
>>  real    0m0.028s
>>  user    0m0.016s
>>  sys     0m0.004s
>>
>
> Unfortunately, the situation is not quite so good on Windows:
> $ time __git_aliases
> <bunch of aliases>
>
> real    0m0.112s
> user    0m0.030s
> sys     0m0.015s
>
> This is with 50 aliases, with 0 aliases I get this:
> $ time __git_aliases
> test
>
> real    0m0.063s
> user    0m0.015s
> sys     0m0.015s
>

OK, apparently I have a dummy alias around from some time earlier, so this was for 51 and 1 alias. But the point remains, it's actually a bit of a problem on Windows.

Previous: Erik Faye-LundNext: SZEDER Gábor
Message 8 of 19 in “git-completion: Add git help completion for aliases”
  1. git-completion: Add git help completion for aliasesJakob Pfender, Mar 21, 2011
  2. Junio C HamanoMar 21, 2011
  3. Johannes SchindelinMar 21, 2011
  4. Junio C HamanoMar 22, 2011
  5. Johannes SchindelinMar 22, 2011
  6. SZEDER GáborMar 22, 2011
  7. Erik Faye-LundMar 22, 2011
  8. Erik Faye-LundMar 22, 2011
  9. SZEDER GáborMar 22, 2011
  10. Erik Faye-LundMar 22, 2011
  11. Michael J GruberMar 22, 2011
  12. SZEDER GáborMar 22, 2011
  13. Erik Faye-LundMar 23, 2011
  14. Jakub NarebskiMar 23, 2011
  15. Erik Faye-LundMar 23, 2011
  16. Junio C HamanoMar 22, 2011
  17. SZEDER GáborMar 22, 2011
  18. SZEDER GáborMar 22, 2011
  19. Michael J GruberMar 22, 2011

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.