Skip to content

fetch: add --[no-]show-forced-updates

Derrick Stolee via GitGitGadget git 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3fetch: add --[no-]show-forced-updates argumentDocumentation/config/fetch.txt Documentation/fetch-options.txt builtin/fetch.c +1 more+51 -112 replies
2/3fetch: warn about forced updates in branch listingDocumentation/config/advice.txt advice.c advice.h +1 more+31 -10 replies
3/3pull: add --[no-]show-forced-updates passthroughbuiltin/pull.c+7 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

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

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/[email protected]/

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

Signature · 1 line
gitgitgadget