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

Re: [PATCH v2 2/9] completion: improve handling of DWIM mode for switch/checkout

From
Junio C Hamano <gitster@pobox.com>
Date
May 27, 2020, 18:03 UTC
Message-ID
<xmqqimghl0ft.fsf@gitster.c.googlers.com>
In-Reply-To
<20200527113831.3294409-3-jacob.e.keller@intel.com>
Jacob Keller <jacob.e.keller@intel.com> writes:
Show 8 quoted lines
> This new logic is more robust, as we will correctly identify superseded
> options, and ensure that both _git_switch and _git_checkout enable DWIM
> in similar ways.
>
> Add several tests which demonstrate the new expected behavior. Note that
> some of the git switch tests are marked as failures because the default
> git switch completion with --guess is sub-par as discussed in a previous
> commit. This will be fixed in a future change.

"as discussed in a previous commit"? 1/9 does not mention --guess at all. Perhaps this is an unintended damage due to rebasing?

In any case, up to this point, the log messages are a bit frustrating read, primarily because the author has spent too much time on DWIM and expect everybody understands exactly what he means when he says "DWIM mode is enabled", while a reader in me keeps asking:

 - what refs get included when I type <TAB> without DWIM mode?
 - what extra refs get included when DWIM mode is enabled?
 - under DWIM mode, do certain refs (that would be included without
   DWIM mode) stop appearing in the completion?

and without getting any answer to them. Perhaps the proposed log message for [1/9] can be made a bit more robust to cover it?

Thanks.
Previous: Jacob KellerNext: Jacob Keller
Message 8 of 13 in “refactor completion for switch and checkout”
  1. 0/9 refactor completion for switch and checkoutJacob Keller, May 27, 2020
  2. 4/9 completion: perform DWIM logic directly in __git_complete_refsJacob Keller, May 27, 2020
  3. 9/9 completion: improve handling of --orphan option of switch/checkoutJacob Keller, May 27, 2020
  4. 8/9 completion: improve handling of -c/-C and -b/-B in switch/checkoutJacob Keller, May 27, 2020
  5. 3/9 completion: extract function __git_dwim_remote_headsJacob Keller, May 27, 2020
  6. 6/9 completion: improve handling of --detach in checkoutJacob Keller, May 27, 2020
  7. 2/9 completion: improve handling of DWIM mode for switch/checkoutJacob Keller, May 27, 2020
  8. Junio C HamanoMay 27, 2020
  9. Jacob KellerMay 27, 2020
  10. Jacob KellerMay 28, 2020
  11. 1/9 completion: replace overloaded track term for __git_complete_refsJacob Keller, May 27, 2020
  12. 5/9 completion: improve completion for git switch with no optionsJacob Keller, May 27, 2020
  13. 7/9 completion: improve handling of --track in switch/checkoutJacob Keller, May 27, 2020

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.