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

Re: [PATCH v2 0/2] Improved bash tab completion for 'git restore' - adds support for auto-completing filenames

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 15, 2022, 16:27 UTC
Message-ID
<xmqqr173faez.fsf@gitster.g>
In-Reply-To
<xmqq8rtbh320.fsf@gitster.g>
Junio C Hamano <gitster@pobox.com> writes:
Show 12 quoted lines
> "David Cantrell via GitGitGadget" <gitgitgadget@gmail.com> writes:
>
>> This adds tab-completion of filenames to the bash completions for git
>> restore.
>>
>> David Cantrell (2):
>>   tab completion of filenames for 'git restore'
>>   if a file has been staged we don't want to list it
>
> Why two patches?  The second separate patch makes the topic look as
> if "oops, the first step designed a wrong behaviour and here is a
> brown paper bag fix-up".
Sorry, I forgot the obligatory clarification for new contributors.

This project gives all contributors a chance to pretend to be a "perfect human". When sending an updated patch (or patch series), contributors are encouraged to hide^W correct their earlier mistakes and present a perfect logical progression that they (would have, if they were perfect) followed to arrive at a perfect end result.

So, instead of having step 1 that uses --committable without justifying why it was chosen, and then change mind in step 2 to replace it with --modified, have a single patch that uses --modified, and explain in the proposed log message that --committable and --modified may be possibilities, and why the patch chose to use the latter. The resulting history without a flip-flop in the middle is easier to use by future developers to understand the reasoning behind each change.

Thanks.
Previous: Junio C HamanoNext: David Cantrell via GitGitGadget
Message 10 of 13 in “tab completion of filenames for 'git restore'”
  1. tab completion of filenames for 'git restore'David Cantrell via GitGitGadget, Mar 11, 2022
  2. Junio C HamanoMar 13, 2022
  3. David CantrellMar 14, 2022
  4. Junio C HamanoMar 15, 2022
  5. 0/2 Improved bash tab completion for 'git restore' - adds support for auto-completing filenamesDavid Cantrell via GitGitGadget, Mar 15, 2022
  6. 2/2 if a file has been staged we don't want to list itDavid Cantrell via GitGitGadget, Mar 15, 2022
  7. Bagas SanjayaMar 16, 2022
  8. 1/2 tab completion of filenames for 'git restore'David Cantrell via GitGitGadget, Mar 15, 2022
  9. Junio C HamanoMar 15, 2022
  10. Junio C HamanoMar 15, 2022
  11. tab completion of filenames for 'git restore'David Cantrell via GitGitGadget, Mar 15, 2022
  12. Junio C HamanoMar 16, 2022
  13. David CantrellMar 17, 2022

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.