{"thread":{"id":"65540","subject":"[PATCH] push: add push.showProgress config option","startedAt":"2026-04-23T12:30:38Z","lastAt":"2026-04-23T12:30:38Z","messageCount":1,"participants":["Harald Nordgren via GitGitGadget"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"542195","messageId":"pull.2279.git.git.1776947435168.gitgitgadget@gmail.com","threadId":"65540","inReplyTo":null,"subject":"[PATCH] push: add push.showProgress config option","fromName":"Harald Nordgren via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2026-04-23T12:30:35Z","receivedAt":"2026-04-23T12:30:38Z","isPatch":true,"body":"From: Harald Nordgren <haraldnordgren@gmail.com>\n\nAdd a `push.showProgress` boolean config that sets the default for\nprogress reporting during `git push`. Setting it to `false` suppresses\nthe pack-objects progress output (Enumerating/Counting/Compressing/\nWriting objects) without silencing the ref update summary line the\nway `--quiet` does. An explicit `--progress` or `--no-progress` on the\ncommand line still overrides the config.\n\nSigned-off-by: Harald Nordgren <haraldnordgren@gmail.com>\n---\n    push: add showProgress config option\n    \n    The amount of output shown for each push is excessive in my opinion.\n    \n    It can be silenced by '-q', but this has the bad side-effect that the\n    success message is not shown. '--no-progress' exists, so would make\n    sense to allow this to be always be turned on.\n    \n    Enumerating objects: 17, done.\n    Counting objects: 100% (17/17), done.\n    Delta compression using up to 8 threads\n    Compressing objects: 100% (9/9), done.\n    Writing objects: 100% (9/9), 1.32 KiB | 1.32 MiB/s, done.\n    Total 9 (delta 8), reused 0 (delta 0), pack-reused 0 (from 0)\n    remote: Resolving deltas: 100% (8/8), completed with 8 local objects.\n    To github.com:HaraldNordgren/git.git\n     + 3b9fc3aac6...6d326b0098 push-use-progress-config -> push-use-progress-config (forced update)\n    \n\nPublished-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-2279%2FHaraldNordgren%2Fpush-use-progress-config-v1\nFetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-2279/HaraldNordgren/push-use-progress-config-v1\nPull-Request: https://github.com/git/git/pull/2279\n\n Documentation/config/push.adoc |  8 ++++++++\n builtin/push.c                 |  3 +++\n t/t5523-push-upstream.sh       | 23 +++++++++++++++++++++++\n 3 files changed, 34 insertions(+)\n\ndiff --git a/Documentation/config/push.adoc b/Documentation/config/push.adoc\nindex d9112b2260..92f22c8ec3 100644\n--- a/Documentation/config/push.adoc\n+++ b/Documentation/config/push.adoc\n@@ -137,3 +137,11 @@ This will result in only b (a and c are cleared).\n \tIf set to `false`, disable use of bitmaps for `git push` even if\n \t`pack.useBitmaps` is `true`, without preventing other git operations\n \tfrom using bitmaps. Default is `true`.\n+\n+`push.showProgress`::\n+\tIf set to `false`, suppress progress reporting during `git push`,\n+\tequivalent to passing `--no-progress` on the command line. If set\n+\tto `true`, force progress reporting, equivalent to `--progress`.\n+\tIf unset, progress is reported when standard error is connected to\n+\ta terminal. An explicit `--progress` or `--no-progress` on the\n+\tcommand line overrides this configuration.\ndiff --git a/builtin/push.c b/builtin/push.c\nindex 7100ffba5d..d35f816740 100644\n--- a/builtin/push.c\n+++ b/builtin/push.c\n@@ -539,6 +539,9 @@ static int git_push_config(const char *k, const char *v,\n \t\telse\n \t\t\t*flags &= ~TRANSPORT_PUSH_FORCE_IF_INCLUDES;\n \t\treturn 0;\n+\t} else if (!strcmp(k, \"push.showprogress\")) {\n+\t\tprogress = git_config_bool(k, v);\n+\t\treturn 0;\n \t}\n \n \treturn git_default_config(k, v, ctx, NULL);\ndiff --git a/t/t5523-push-upstream.sh b/t/t5523-push-upstream.sh\nindex 22d3e1162c..27aa87ee01 100755\n--- a/t/t5523-push-upstream.sh\n+++ b/t/t5523-push-upstream.sh\n@@ -120,6 +120,29 @@ test_expect_success TTY 'push --no-progress suppresses progress' '\n \ttest_grep ! \"Writing objects\" err\n '\n \n+test_expect_success TTY 'push.showProgress=false suppresses progress' '\n+\tensure_fresh_upstream &&\n+\n+\ttest_terminal git -c push.showProgress=false push -u upstream main \\\n+\t\t>out 2>err &&\n+\ttest_grep ! \"Writing objects\" err\n+'\n+\n+test_expect_success 'push.showProgress=true forces progress on non-tty' '\n+\tensure_fresh_upstream &&\n+\n+\tgit -c push.showProgress=true push -u upstream main >out 2>err &&\n+\ttest_grep \"Writing objects\" err\n+'\n+\n+test_expect_success TTY '--progress overrides push.showProgress=false' '\n+\tensure_fresh_upstream &&\n+\n+\ttest_terminal git -c push.showProgress=false push -u --progress \\\n+\t\tupstream main >out 2>err &&\n+\ttest_grep \"Writing objects\" err\n+'\n+\n test_expect_success TTY 'quiet push' '\n \tensure_fresh_upstream &&\n \n\nbase-commit: 94f057755b7941b321fd11fec1b2e3ca5313a4e0\n-- \ngitgitgadget\n"}]}