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

Re: [PATCH 1/4] reset: do not make '--quiet' disable index refresh

From
Victoria Dye <vdye@github.com>
Date
Mar 23, 2022, 16:52 UTC
Message-ID
<96e386f9-01b5-a231-f1f6-4d9ffefc8f8d@github.com>
In-Reply-To
<355f36d5-7153-42a4-6db8-b9ba5fcac422@gmail.com>
Phillip Wood wrote:
Show 53 quoted lines
> Hi Victoria
> 
> On 21/03/2022 20:34, Victoria Dye via GitGitGadget wrote:
>> From: Victoria Dye <vdye@github.com>
>>
>> Update '--quiet' to no longer implicitly skip refreshing the index in a
>> mixed reset. Users now have the ability to explicitly disable refreshing the
>> index with the '--no-refresh' option, so they no longer need to use
>> '--quiet' to do so. Moreover, we explicitly remove the refresh-skipping
>> behavior from '--quiet' because it is completely unrelated to the stated
>> purpose of the option: "Be quiet, only report errors."
>>
>> Signed-off-by: Victoria Dye <vdye@github.com>
>> ---
>>   Documentation/git-reset.txt |  5 +----
>>   builtin/reset.c             |  7 -------
>>   t/t7102-reset.sh            | 32 +++++---------------------------
>>   3 files changed, 6 insertions(+), 38 deletions(-)
>>
>> diff --git a/Documentation/git-reset.txt b/Documentation/git-reset.txt
>> index 89ddc85c2e4..bc1646c3016 100644
>> --- a/Documentation/git-reset.txt
>> +++ b/Documentation/git-reset.txt
>> @@ -114,10 +114,7 @@ OPTIONS
>>   --no-refresh::
>>       Proactively refresh the index after a mixed reset. If unspecified, the
>>       behavior falls back on the `reset.refresh` config option. If neither
>> -    `--[no-]refresh` nor `reset.refresh` are set, the default behavior is
>> -    decided by the `--[no-]quiet` option and/or `reset.quiet` config.
>> -    If `--quiet` is specified or `reset.quiet` is set with no command-line
>> -    "quiet" setting, refresh is disabled. Otherwise, refresh is enabled.
>> +    `--[no-]refresh` nor `reset.refresh` are set, refresh is enabled.
>>     --pathspec-from-file=<file>::
>>       Pathspec is passed in `<file>` instead of commandline args. If
>> diff --git a/builtin/reset.c b/builtin/reset.c
>> index c8a356ec5b0..7c3828f6fc5 100644
>> --- a/builtin/reset.c
>> +++ b/builtin/reset.c
>> @@ -430,13 +430,6 @@ int cmd_reset(int argc, const char **argv, const char *prefix)
>>                           PARSE_OPT_KEEP_DASHDASH);
>>       parse_args(&pathspec, argv, prefix, patch_mode, &rev);
>>   -    /*
>> -     * If refresh is completely unspecified (either by config or by command
>> -     * line option), decide based on 'quiet'.
>> -     */
>> -    if (refresh < 0)
>> -        refresh = !quiet;
> 
> Does this mean we can stop initializing refresh to -1?
> 
> Best Wishes
> 
> Phillip

Yes, thanks for catching that! It should be initialized to 1 in this patch (rather than later in patch 4).

Previous: Phillip WoodNext: Victoria Dye via GitGitGadget
Message 6 of 25 in “reset: make --no-refresh the only way to skip index refresh”
  1. 0/4 reset: make --no-refresh the only way to skip index refreshVictoria Dye via GitGitGadget, Mar 21, 2022
  2. 2/4 reset: deprecate 'reset.quiet' config optionVictoria Dye via GitGitGadget, Mar 21, 2022
  3. Phillip WoodMar 23, 2022
  4. 1/4 reset: do not make '--quiet' disable index refreshVictoria Dye via GitGitGadget, Mar 21, 2022
  5. Phillip WoodMar 23, 2022
  6. Victoria DyeMar 23, 2022
  7. 3/4 reset: deprecate 'reset.refresh' config optionVictoria Dye via GitGitGadget, Mar 21, 2022
  8. Phillip WoodMar 23, 2022
  9. Victoria DyeMar 23, 2022
  10. 4/4 reset: deprecate '--refresh', leaving only '--no-refresh'Victoria Dye via GitGitGadget, Mar 21, 2022
  11. Phillip WoodMar 23, 2022
  12. Victoria DyeMar 23, 2022
  13. 0/3 reset: make --no-refresh the only way to skip index refreshVictoria Dye via GitGitGadget, Mar 23, 2022
  14. 1/3 reset: do not make '--quiet' disable index refreshVictoria Dye via GitGitGadget, Mar 23, 2022
  15. 2/3 reset: remove 'reset.quiet' config optionVictoria Dye via GitGitGadget, Mar 23, 2022
  16. 3/3 reset: remove 'reset.refresh' config optionVictoria Dye via GitGitGadget, Mar 23, 2022
  17. Derrick StoleeMar 23, 2022
  18. Junio C HamanoMar 23, 2022
  19. Phillip WoodMar 24, 2022
  20. Junio C HamanoMar 24, 2022
  21. Junio C HamanoMar 24, 2022
  22. Victoria DyeMar 24, 2022
  23. Junio C HamanoMar 24, 2022
  24. Derrick StoleeMar 25, 2022
  25. Junio C HamanoMar 25, 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.