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

Re: What's cooking in git.git (Jun 2013, #03; Thu, 6)

From
Junio C Hamano <gitster@pobox.com>
Date
Jun 10, 2013, 07:00 UTC
Message-ID
<7v1u8amovl.fsf@alter.siamese.dyndns.org>
In-Reply-To
<CALkWK0kvSvK=bFJo13=yw+2EZmGyv46_DUEZaniYGCe7D_V2wg@mail.gmail.com>
Ramkumar Ramachandra <artagnon@gmail.com> writes:
Show 15 quoted lines
> Junio C Hamano wrote:
>>     Revert 77c1305 and 3c3b46b
>
> The core of the argument seems to be that
> __git_complete_revlist_file() is a misleading name for the completion
> done by archive and ls-tree, but __git_complete_file() is somehow a
> less misleading name?  Irrespective of what the valid completions of
> the various commands are, I want to know which completion function
> will be _used_ when I'm reading the script.  And that is
> __git_complete_revlist_file().
>
> To me, it looks like mega-bikeshedding; a huge amount of time and
> effort going behind a non-functional variable rename (and the best
> part? the rename isn't getting us a "better" name; just a "historical"
> name).  But whatever.

To me the most important part is that we have two separate functions that are used consistently by how the completion is to be done for their users. The complete-file variant can then lose the A..B range completion, and then be given a better name than FILE to express what it does if somebody can find one. When it happens, the same better name should be used to rename complete-revlist-FILE by replacing the "FILE" part.

I initially thought that FILE referred to the pathspecs (i.e. the last part in "log <rev> <file>"), and felt it was strange to call it FILE. Perhaps that (i.e. it not being pathspec) is what you find it misnamed).

But it turns out that in the context of these functions it refers to "what users consider paths in objects stored in the object database" (as opposed to working tree paths). That is what ls-tree would take (i.e. <tree-ish> and <tree-ish>:<path>). And I do not offhand think of a better name myself to strongly oppose to using the word FILE to refer to what it does.

Previous: Ramkumar RamachandraNext: Ramkumar Ramachandra
Message 20 of 24 in “What's cooking in git.git (Jun 2013, #03; Thu, 6)”
  1. Junio C HamanoJun 6, 2013
  2. SZEDER GáborJun 7, 2013
  3. Junio C HamanoJun 7, 2013
  4. Junio C HamanoJun 7, 2013
  5. SZEDER GáborJun 7, 2013
  6. Ramkumar RamachandraJun 7, 2013
  7. SZEDER GáborJun 7, 2013
  8. Ramkumar RamachandraJun 7, 2013
  9. Junio C HamanoJun 7, 2013
  10. Ramkumar RamachandraJun 7, 2013
  11. SZEDER GáborJun 7, 2013
  12. Junio C HamanoJun 7, 2013
  13. SZEDER GáborJun 7, 2013
  14. Junio C HamanoJun 7, 2013
  15. SZEDER GáborJun 8, 2013
  16. Junio C HamanoJun 9, 2013
  17. SZEDER GáborJun 9, 2013
  18. Junio C HamanoJun 9, 2013
  19. Ramkumar RamachandraJun 10, 2013
  20. Junio C HamanoJun 10, 2013
  21. Ramkumar RamachandraJun 10, 2013
  22. SZEDER GáborJun 7, 2013
  23. Ramkumar RamachandraJun 8, 2013
  24. Matthieu MoyJun 8, 2013

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.