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

Re: [PATCH 2/3] completion: remove old code

From
Felipe Contreras <felipe.contreras@gmail.com>
Date
Jan 30, 2012, 03:24 UTC
Message-ID
<CAMP44s1H6Db6Xq_iZseXppaTwpBCeu14ySgPfmoQnpELfywQ-Q@mail.gmail.com>
In-Reply-To
<20120130023642.GA14986@burratino>
On Mon, Jan 30, 2012 at 4:36 AM, Jonathan Nieder <jrnieder@gmail.com> wrote:
Show 14 quoted lines
> Felipe Contreras wrote:
>
>> We don't need to check for GIT_DIR/remotes, right? This was removed long
>> time ago.
>
> I don't follow.  fetch, push, and remote still look in .git/remotes
> like they always did, last time I checked.
>
> Perhaps you mean that /usr/share/git-core/templates/ no longer
> contains a remotes/ directory?  That's true but not particularly
> relevant.  A more relevant detail would be that very few people _use_
> the .git/remotes feature, though it is not obvious to me whether that
> justifies removing this code from the git-completion script that
> already works.

The problem is all the 'nullglob' stuff. It's *a lot* of code for this feature that nobody uses.

OK, maybe some people use it, but most likely they are using an old version of git, and thus an old version of the completion script.

Anyway, aren't there easier ways to get this? Perhaps first checking if the directory exists, to avoid wasting cycles.

Something like:
  test -d "$d/remotes" && ls -1 "$d/remotes"
-- 
Felipe Contreras
Previous: Jonathan NiederNext: Jonathan Nieder
Message 11 of 28 in “completion: trivial cleanups”
  1. 0/3 completion: trivial cleanupsFelipe Contreras, Jan 29, 2012
  2. 1/3 completion: be nicer with zshFelipe Contreras, Jan 29, 2012
  3. Junio C HamanoJan 30, 2012
  4. Junio C HamanoJan 30, 2012
  5. Felipe ContrerasJan 30, 2012
  6. Felipe ContrerasJan 30, 2012
  7. Junio C HamanoJan 30, 2012
  8. Felipe ContrerasJan 30, 2012
  9. 2/3 completion: remove old codeFelipe Contreras, Jan 29, 2012
  10. Jonathan NiederJan 30, 2012
  11. Felipe ContrerasJan 30, 2012
  12. Jonathan NiederJan 30, 2012
  13. Junio C HamanoJan 30, 2012
  14. Felipe ContrerasJan 30, 2012
  15. Frans KlaverJan 30, 2012
  16. Felipe ContrerasJan 30, 2012
  17. Frans KlaverJan 30, 2012
  18. Felipe ContrerasJan 30, 2012
  19. Jonathan NiederJan 30, 2012
  20. 3/3 completion: remove unused codeFelipe Contreras, Jan 29, 2012
  21. Jonathan NiederJan 30, 2012
  22. Jonathan NiederJan 30, 2012
  23. Felipe ContrerasJan 30, 2012
  24. Thomas RastJan 30, 2012
  25. Junio C HamanoJan 30, 2012
  26. Felipe ContrerasJan 30, 2012
  27. Thomas RastJan 30, 2012
  28. Felipe ContrerasJan 30, 2012

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.