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

[PATCH 0/3] fetch: add --[no-]show-forced-updates

From
Derrick Stolee via GitGitGadget <gitgitgadget@gmail.com>
Date
Jun 18, 2019, 20:25 UTC
Message-ID
<pull.273.git.gitgitgadget@gmail.com>

The git fetch builtin includes a calculation to see if the ref values were forced updates (i.e. if the old value is not in the history of the new value). In a repo with many refs and a fast-moving history, this calculation can be very slow.

This series adds a new --[no-]show-forced-updates option to 'git fetch' to avoid this calculation when requested. Further:

 1. Add a new fetch.showForcedUpdates config setting that provides a default
    value for --[no-]show-forced-updates.
    
    
 2. Add a new advice.fetchShowForcedUpdates config setting associated with a
    warning that suggests fetch.showForcedUpdates when the calculation takes
    a long time, or warns about the lack of "(forced update)" messages.
    
    
 3. Add the command-line options to 'git pull'.
    
    

We have been running with these commits in microsoft/git for a while now and no user has complained that the messages were removed (VFS for Git sets fetch.showForcedUpdates=false by default). Users have complained about the warning messages always appearing, so this series includes the advice config setting. Further, I added a test to demonstrate the behavior change between the two options.

The fetch.showForcedUpdates config setting is a candidate to be added to the proposed "large repo" meta-config setting previously discussed [1]. I'm putting this out for independent review as it is much smaller compared to the potential of that series.

Thanks, -Stolee
[1] https://public-inbox.org/git/pull.254.git.gitgitgadget@gmail.com/
Derrick Stolee (3):
  fetch: add --[no-]show-forced-updates argument
  fetch: warn about forced updates in branch listing
  pull: add --[no-]show-forced-updates passthrough
 Documentation/config/advice.txt |  4 ++++
 Documentation/config/fetch.txt  |  5 +++++
 Documentation/fetch-options.txt | 13 +++++++++++++
 advice.c                        |  2 ++
 advice.h                        |  1 +
 builtin/fetch.c                 | 34 ++++++++++++++++++++++++++++++++-
 builtin/pull.c                  |  7 +++++++
 t/t5510-fetch.sh                | 23 ++++++++++++++++++++++
 8 files changed, 88 insertions(+), 1 deletion(-)
base-commit: b697d92f56511e804b8ba20ccbe7bdc85dc66810
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-273%2Fderrickstolee%2Fshow-forced-updates-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-273/derrickstolee/show-forced-updates-v1
Pull-Request: https://github.com/gitgitgadget/git/pull/273
-- 
gitgitgadget
Next: Derrick Stolee via GitGitGadget
Message 1 of 16 in “fetch: add --[no-]show-forced-updates”
  1. 0/3 fetch: add --[no-]show-forced-updatesDerrick Stolee via GitGitGadget, Jun 18, 2019
  2. 1/3 fetch: add --[no-]show-forced-updates argumentDerrick Stolee via GitGitGadget, Jun 18, 2019
  3. t5510-fetch: fix negated 'test_i18ngrep' invocationSZEDER Gábor, Jul 30, 2019
  4. SZEDER GáborJul 30, 2019
  5. Derrick StoleeJul 31, 2019
  6. 0/3 tests: run non-httpd-specific tests before sourcing 'lib-httpd.sh'SZEDER Gábor, Aug 1, 2019
  7. 1/3 t5510-fetch: run non-httpd-specific test before sourcing 'lib-httpd.sh'SZEDER Gábor, Aug 1, 2019
  8. Derrick StoleeAug 1, 2019
  9. 2/3 t5703: run all non-httpd-specific tests before sourcing 'lib-httpd.sh'SZEDER Gábor, Aug 1, 2019
  10. 3/3 tests: warn against appending non-httpd-specific tests at the endSZEDER Gábor, Aug 1, 2019
  11. SZEDER GáborAug 1, 2019
  12. Junio C HamanoAug 1, 2019
  13. SZEDER GáborAug 2, 2019
  14. Junio C HamanoAug 2, 2019
  15. 3/3 pull: add --[no-]show-forced-updates passthroughDerrick Stolee via GitGitGadget, Jun 18, 2019
  16. 2/3 fetch: warn about forced updates in branch listingDerrick Stolee via GitGitGadget, Jun 18, 2019

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.