{"thread":{"id":"66450","subject":"[PATCH] branch: let --delete-merged default to every upstream","startedAt":"2026-10-02T16:55:50Z","lastAt":"2026-10-05T04:27:30Z","messageCount":8,"participants":["Harald Nordgren via GitGitGadget","Junio C Hamano","Phillip Wood","Harald Nordgren"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"553984","messageId":"pull.2428.git.git.1790960147943.gitgitgadget@gmail.com","threadId":"66450","inReplyTo":null,"subject":"[PATCH] branch: let --delete-merged default to every upstream","fromName":"Harald Nordgren via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2026-10-02T16:55:47Z","receivedAt":"2026-10-02T16:55:50Z","isPatch":true,"body":"From: Harald Nordgren <haraldnordgren@gmail.com>\n\nCleaning up every branch whose work has landed upstream required\ntyping '*/*' as the pattern.\n\nLet a bare \"git branch --delete-merged\" consider every upstream. As\nwith \"--merged\" without a commit, this applies only when the option\ncomes last, so \"git branch --dry-run --delete-merged\" previews the\ncleanup.\n\nSigned-off-by: Harald Nordgren <haraldnordgren@gmail.com>\n---\n    branch: let --delete-merged default to every upstream\n    \n    A bare git branch --delete-merged now considers every upstream.\n\nPublished-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-2428%2FHaraldNordgren%2Fbranch-delete-merged-default-v1\nFetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-2428/HaraldNordgren/branch-delete-merged-default-v1\nPull-Request: https://github.com/git/git/pull/2428\n\n Documentation/git-branch.adoc |  6 ++++--\n builtin/branch.c              | 14 +++++++++++---\n t/t3200-branch.sh             | 25 ++++++++++++++++++++++---\n 3 files changed, 37 insertions(+), 8 deletions(-)\n\ndiff --git a/Documentation/git-branch.adoc b/Documentation/git-branch.adoc\nindex bfdf459329..4a91ae6879 100644\n--- a/Documentation/git-branch.adoc\n+++ b/Documentation/git-branch.adoc\n@@ -25,6 +25,7 @@ git branch (-m|-M) [<old-branch>] <new-branch>\n git branch (-c|-C) [<old-branch>] <new-branch>\n git branch (-d|-D) [-r] <branch-name>...\n git branch --edit-description [<branch-name>]\n+git branch [--dry-run] --delete-merged\n git branch [--dry-run] (--delete-merged <pattern>)... [<branch-pattern>...]\n \n DESCRIPTION\n@@ -202,14 +203,15 @@ This option is only applicable in non-verbose mode.\n \tPrint the name of the current branch. In detached `HEAD` state,\n \tnothing is printed.\n \n-`--delete-merged <pattern>`::\n+`--delete-merged [<pattern>]`::\n \tDelete local branches whose configured upstream matches\n \t_<pattern>_, but only when their tip is reachable from that\n \tupstream. In other words, the work on the branch has already\n \tlanded on the upstream it tracks, so the local copy is no longer\n \tneeded. _<pattern>_ may name a ref, a remote (using the branch its\n \t`HEAD` points at), or a shell-style glob. The option can be\n-\trepeated to widen the upstream match.\n+\trepeated to widen the upstream match. Without _<pattern>_, every\n+\tupstream matches.\n \tOptional _<branch-pattern>_ arguments limit which local branches\n \tare considered, e.g. `git branch --delete-merged 'origin/*'\n \t'topic-*'`.\ndiff --git a/builtin/branch.c b/builtin/branch.c\nindex a613148fc7..f2a4e117dc 100644\n--- a/builtin/branch.c\n+++ b/builtin/branch.c\n@@ -39,6 +39,7 @@ static const char * const builtin_branch_usage[] = {\n \tN_(\"git branch [<options>] (-c | -C) [<old-branch>] <new-branch>\"),\n \tN_(\"git branch [<options>] [-r | -a] [--points-at]\"),\n \tN_(\"git branch [<options>] [-r | -a] [--format]\"),\n+\tN_(\"git branch [<options>] --delete-merged\"),\n \tN_(\"git branch [<options>] (--delete-merged <pattern>)... \"\n \t   \"[<branch-pattern>...]\"),\n \tNULL\n@@ -1029,9 +1030,16 @@ int cmd_branch(int argc,\n \t\tOPT_BOOL(0, \"create-reflog\", &reflog, N_(\"create the branch's reflog\")),\n \t\tOPT_BOOL(0, \"edit-description\", &edit_description,\n \t\t\t N_(\"edit the description for the branch\")),\n-\t\tOPT_CALLBACK_F(0, \"delete-merged\", &delete_merged, N_(\"pattern\"),\n-\t\t\tN_(\"delete merged branches whose upstream matches <pattern> (repeatable)\"),\n-\t\t\tPARSE_OPT_NONEG, parse_opt_strvec),\n+\t\t{\n+\t\t\t.type = OPTION_CALLBACK,\n+\t\t\t.long_name = \"delete-merged\",\n+\t\t\t.value = &delete_merged,\n+\t\t\t.argh = N_(\"pattern\"),\n+\t\t\t.help = N_(\"delete merged branches whose upstream matches <pattern> (repeatable)\"),\n+\t\t\t.flags = PARSE_OPT_LASTARG_DEFAULT | PARSE_OPT_NONEG,\n+\t\t\t.callback = parse_opt_strvec,\n+\t\t\t.defval = (intptr_t) \"**\",\n+\t\t},\n \t\tOPT_BOOL(0, \"dry-run\", &dry_run,\n \t\t\tN_(\"with --delete-merged, only print which branches would be deleted\")),\n \t\tOPT__FORCE(&force, N_(\"force creation, move/rename, deletion\"), PARSE_OPT_NOCOMPLETE),\ndiff --git a/t/t3200-branch.sh b/t/t3200-branch.sh\nindex cdb6c6a634..e60f4794c8 100755\n--- a/t/t3200-branch.sh\n+++ b/t/t3200-branch.sh\n@@ -2133,9 +2133,28 @@ test_expect_success '--delete-merged result is independent of stacked branch nam\n \t)\n '\n \n-test_expect_success '--delete-merged requires a value' '\n-\ttest_must_fail git -C forked branch --delete-merged 2>err &&\n-\ttest_grep \"requires a value\" err\n+test_expect_success '--delete-merged without a pattern matches every upstream' '\n+\tsetup_repo_for_delete_merged &&\n+\tcreate_merged_branch merged &&\n+\t(\n+\t\tcd repo &&\n+\t\tgit branch --track local-topic main &&\n+\t\tgit checkout --detach &&\n+\n+\t\tgit branch --dry-run --delete-merged &&\n+\n+\t\tcheck_branches <<-\\EOF &&\n+\t\tlocal-topic\n+\t\tmain\n+\t\tmerged\n+\t\tEOF\n+\n+\t\tgit branch --delete-merged &&\n+\n+\t\tcheck_branches <<-\\EOF\n+\t\tmain\n+\t\tEOF\n+\t)\n '\n \n test_expect_success '--delete-merged honours branch.<name>.deleteMerged=false' '\n\nbase-commit: a018953688f1b10bddf91bff8747068f5f4746a4\n-- \ngitgitgadget\n"},{"id":"553987","messageId":"xmqq8q4gxc1w.fsf@gitster.g","threadId":"66450","inReplyTo":"pull.2428.git.git.1790960147943.gitgitgadget@gmail.com","subject":"Re: [PATCH] branch: let --delete-merged default to every upstream","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2026-10-02T17:11:23Z","receivedAt":"2026-10-02T17:11:29Z","isPatch":true,"body":"\"Harald Nordgren via GitGitGadget\" <gitgitgadget@gmail.com> writes:\n\n> From: Harald Nordgren <haraldnordgren@gmail.com>\n>\n> Cleaning up every branch whose work has landed upstream required\n> typing '*/*' as the pattern.\n\nThis description and what the code actually does contradict with\neach other, I wonder?\n\n> Let a bare \"git branch --delete-merged\" consider every upstream. As\n> with \"--merged\" without a commit, this applies only when the option\n> comes last, so \"git branch --dry-run --delete-merged\" previews the\n> cleanup.\n\nThere are many options ('--merged', '--no-merged', '--contains',\n'--no-contains', '--unset-upstream', '--edit-description') that\ndefault to the current branch, which is a very natural thing within\nthe context of git.  Is defaulting to '**' is a good comparison to\nthem?  I dunno.\n\n> +\t\t\t.defval = (intptr_t) \"**\",\n> +\t\t},\n"},{"id":"554100","messageId":"pull.2428.v2.git.git.1791102886740.gitgitgadget@gmail.com","threadId":"66450","inReplyTo":"pull.2428.git.git.1790960147943.gitgitgadget@gmail.com","subject":"[PATCH v2] branch: let --delete-merged default to every upstream","fromName":"Harald Nordgren via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2026-10-04T08:34:46Z","receivedAt":"2026-10-04T08:34:51Z","isPatch":true,"body":"From: Harald Nordgren <haraldnordgren@gmail.com>\n\nCleaning up every branch whose work has landed upstream required\ntyping '**' as the pattern.\n\nLet a bare \"git branch --delete-merged\" consider every upstream. This\napplies only when the option comes last, so\n\"git branch --dry-run --delete-merged\" previews the cleanup.\n\nSigned-off-by: Harald Nordgren <haraldnordgren@gmail.com>\n---\n    branch: let --delete-merged default to every upstream\n    \n    A bare git branch --delete-merged now considers every upstream.\n    \n    Changes in v2:\n    \n     * Name the default pattern ** instead of */*. Drop reference to\n       --merged.\n\nPublished-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-2428%2FHaraldNordgren%2Fbranch-delete-merged-default-v2\nFetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-2428/HaraldNordgren/branch-delete-merged-default-v2\nPull-Request: https://github.com/git/git/pull/2428\n\nRange-diff vs v1:\n\n 1:  9a576d941c ! 1:  c496777c0b branch: let --delete-merged default to every upstream\n     @@ Commit message\n          branch: let --delete-merged default to every upstream\n      \n          Cleaning up every branch whose work has landed upstream required\n     -    typing '*/*' as the pattern.\n     +    typing '**' as the pattern.\n      \n     -    Let a bare \"git branch --delete-merged\" consider every upstream. As\n     -    with \"--merged\" without a commit, this applies only when the option\n     -    comes last, so \"git branch --dry-run --delete-merged\" previews the\n     -    cleanup.\n     +    Let a bare \"git branch --delete-merged\" consider every upstream. This\n     +    applies only when the option comes last, so\n     +    \"git branch --dry-run --delete-merged\" previews the cleanup.\n      \n          Signed-off-by: Harald Nordgren <haraldnordgren@gmail.com>\n      \n\n\n Documentation/git-branch.adoc |  6 ++++--\n builtin/branch.c              | 14 +++++++++++---\n t/t3200-branch.sh             | 25 ++++++++++++++++++++++---\n 3 files changed, 37 insertions(+), 8 deletions(-)\n\ndiff --git a/Documentation/git-branch.adoc b/Documentation/git-branch.adoc\nindex bfdf459329..4a91ae6879 100644\n--- a/Documentation/git-branch.adoc\n+++ b/Documentation/git-branch.adoc\n@@ -25,6 +25,7 @@ git branch (-m|-M) [<old-branch>] <new-branch>\n git branch (-c|-C) [<old-branch>] <new-branch>\n git branch (-d|-D) [-r] <branch-name>...\n git branch --edit-description [<branch-name>]\n+git branch [--dry-run] --delete-merged\n git branch [--dry-run] (--delete-merged <pattern>)... [<branch-pattern>...]\n \n DESCRIPTION\n@@ -202,14 +203,15 @@ This option is only applicable in non-verbose mode.\n \tPrint the name of the current branch. In detached `HEAD` state,\n \tnothing is printed.\n \n-`--delete-merged <pattern>`::\n+`--delete-merged [<pattern>]`::\n \tDelete local branches whose configured upstream matches\n \t_<pattern>_, but only when their tip is reachable from that\n \tupstream. In other words, the work on the branch has already\n \tlanded on the upstream it tracks, so the local copy is no longer\n \tneeded. _<pattern>_ may name a ref, a remote (using the branch its\n \t`HEAD` points at), or a shell-style glob. The option can be\n-\trepeated to widen the upstream match.\n+\trepeated to widen the upstream match. Without _<pattern>_, every\n+\tupstream matches.\n \tOptional _<branch-pattern>_ arguments limit which local branches\n \tare considered, e.g. `git branch --delete-merged 'origin/*'\n \t'topic-*'`.\ndiff --git a/builtin/branch.c b/builtin/branch.c\nindex a613148fc7..f2a4e117dc 100644\n--- a/builtin/branch.c\n+++ b/builtin/branch.c\n@@ -39,6 +39,7 @@ static const char * const builtin_branch_usage[] = {\n \tN_(\"git branch [<options>] (-c | -C) [<old-branch>] <new-branch>\"),\n \tN_(\"git branch [<options>] [-r | -a] [--points-at]\"),\n \tN_(\"git branch [<options>] [-r | -a] [--format]\"),\n+\tN_(\"git branch [<options>] --delete-merged\"),\n \tN_(\"git branch [<options>] (--delete-merged <pattern>)... \"\n \t   \"[<branch-pattern>...]\"),\n \tNULL\n@@ -1029,9 +1030,16 @@ int cmd_branch(int argc,\n \t\tOPT_BOOL(0, \"create-reflog\", &reflog, N_(\"create the branch's reflog\")),\n \t\tOPT_BOOL(0, \"edit-description\", &edit_description,\n \t\t\t N_(\"edit the description for the branch\")),\n-\t\tOPT_CALLBACK_F(0, \"delete-merged\", &delete_merged, N_(\"pattern\"),\n-\t\t\tN_(\"delete merged branches whose upstream matches <pattern> (repeatable)\"),\n-\t\t\tPARSE_OPT_NONEG, parse_opt_strvec),\n+\t\t{\n+\t\t\t.type = OPTION_CALLBACK,\n+\t\t\t.long_name = \"delete-merged\",\n+\t\t\t.value = &delete_merged,\n+\t\t\t.argh = N_(\"pattern\"),\n+\t\t\t.help = N_(\"delete merged branches whose upstream matches <pattern> (repeatable)\"),\n+\t\t\t.flags = PARSE_OPT_LASTARG_DEFAULT | PARSE_OPT_NONEG,\n+\t\t\t.callback = parse_opt_strvec,\n+\t\t\t.defval = (intptr_t) \"**\",\n+\t\t},\n \t\tOPT_BOOL(0, \"dry-run\", &dry_run,\n \t\t\tN_(\"with --delete-merged, only print which branches would be deleted\")),\n \t\tOPT__FORCE(&force, N_(\"force creation, move/rename, deletion\"), PARSE_OPT_NOCOMPLETE),\ndiff --git a/t/t3200-branch.sh b/t/t3200-branch.sh\nindex cdb6c6a634..e60f4794c8 100755\n--- a/t/t3200-branch.sh\n+++ b/t/t3200-branch.sh\n@@ -2133,9 +2133,28 @@ test_expect_success '--delete-merged result is independent of stacked branch nam\n \t)\n '\n \n-test_expect_success '--delete-merged requires a value' '\n-\ttest_must_fail git -C forked branch --delete-merged 2>err &&\n-\ttest_grep \"requires a value\" err\n+test_expect_success '--delete-merged without a pattern matches every upstream' '\n+\tsetup_repo_for_delete_merged &&\n+\tcreate_merged_branch merged &&\n+\t(\n+\t\tcd repo &&\n+\t\tgit branch --track local-topic main &&\n+\t\tgit checkout --detach &&\n+\n+\t\tgit branch --dry-run --delete-merged &&\n+\n+\t\tcheck_branches <<-\\EOF &&\n+\t\tlocal-topic\n+\t\tmain\n+\t\tmerged\n+\t\tEOF\n+\n+\t\tgit branch --delete-merged &&\n+\n+\t\tcheck_branches <<-\\EOF\n+\t\tmain\n+\t\tEOF\n+\t)\n '\n \n test_expect_success '--delete-merged honours branch.<name>.deleteMerged=false' '\n\nbase-commit: c46c1e37724f0478939de636ab8ea5a89086d532\n-- \ngitgitgadget\n"},{"id":"554102","messageId":"ae47baff-daaa-4b78-97e9-94faebb8e694@gmail.com","threadId":"66450","inReplyTo":"pull.2428.git.git.1790960147943.gitgitgadget@gmail.com","subject":"Re: [PATCH] branch: let --delete-merged default to every upstream","fromName":"Phillip Wood","fromEmail":"phillip.wood123@gmail.com","sentAt":"2026-10-04T09:55:06Z","receivedAt":"2026-10-04T09:55:09Z","isPatch":true,"body":"Hi Harald\n\nOn 02/10/2026 17:55, Harald Nordgren via GitGitGadget wrote:\n> From: Harald Nordgren <haraldnordgren@gmail.com>\n> \n> Cleaning up every branch whose work has landed upstream required\n> typing '*/*' as the pattern.\n> \n> Let a bare \"git branch --delete-merged\" consider every upstream. As\n> with \"--merged\" without a commit, this applies only when the option\n> comes last, so \"git branch --dry-run --delete-merged\" previews the\n> cleanup.\n\nPARSE_OPT_LASTARG_DEFAULT is a usability footgun that I think it is best \nto avoid. If we ever wanted to add a new option that worked with \n\"--delete-merged\" (for example to control whether it looked for branches \nthat had been squashed) then\n\n\tgit branch --delete-merged --foo\n\nwould behave differently to\n\n\tgit branch --foo --delete-merged\n\nWith hindsight maybe\n\n\tgit branch --delete-merged [<upstream>...] -- [<branch>...]\n\nand\n\n\tgit branch --forked [<upstream>...] -- [<branch>...]\n\nwould have been a better design. That's the sort of design mistake that \nis much more likely to happen when a contributor sends an endless stream \nof patches because they're eager to get something merged, rather than \nengaging in a thoughtful discussion with the reviewer.\n\nThanks\n\nPhillip\n\n> Signed-off-by: Harald Nordgren <haraldnordgren@gmail.com>\n> ---\n>      branch: let --delete-merged default to every upstream\n>      \n>      A bare git branch --delete-merged now considers every upstream.\n> \n> Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-2428%2FHaraldNordgren%2Fbranch-delete-merged-default-v1\n> Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-2428/HaraldNordgren/branch-delete-merged-default-v1\n> Pull-Request: https://github.com/git/git/pull/2428\n> \n>   Documentation/git-branch.adoc |  6 ++++--\n>   builtin/branch.c              | 14 +++++++++++---\n>   t/t3200-branch.sh             | 25 ++++++++++++++++++++++---\n>   3 files changed, 37 insertions(+), 8 deletions(-)\n> \n> diff --git a/Documentation/git-branch.adoc b/Documentation/git-branch.adoc\n> index bfdf459329..4a91ae6879 100644\n> --- a/Documentation/git-branch.adoc\n> +++ b/Documentation/git-branch.adoc\n> @@ -25,6 +25,7 @@ git branch (-m|-M) [<old-branch>] <new-branch>\n>   git branch (-c|-C) [<old-branch>] <new-branch>\n>   git branch (-d|-D) [-r] <branch-name>...\n>   git branch --edit-description [<branch-name>]\n> +git branch [--dry-run] --delete-merged\n>   git branch [--dry-run] (--delete-merged <pattern>)... [<branch-pattern>...]\n>   \n>   DESCRIPTION\n> @@ -202,14 +203,15 @@ This option is only applicable in non-verbose mode.\n>   \tPrint the name of the current branch. In detached `HEAD` state,\n>   \tnothing is printed.\n>   \n> -`--delete-merged <pattern>`::\n> +`--delete-merged [<pattern>]`::\n>   \tDelete local branches whose configured upstream matches\n>   \t_<pattern>_, but only when their tip is reachable from that\n>   \tupstream. In other words, the work on the branch has already\n>   \tlanded on the upstream it tracks, so the local copy is no longer\n>   \tneeded. _<pattern>_ may name a ref, a remote (using the branch its\n>   \t`HEAD` points at), or a shell-style glob. The option can be\n> -\trepeated to widen the upstream match.\n> +\trepeated to widen the upstream match. Without _<pattern>_, every\n> +\tupstream matches.\n>   \tOptional _<branch-pattern>_ arguments limit which local branches\n>   \tare considered, e.g. `git branch --delete-merged 'origin/*'\n>   \t'topic-*'`.\n> diff --git a/builtin/branch.c b/builtin/branch.c\n> index a613148fc7..f2a4e117dc 100644\n> --- a/builtin/branch.c\n> +++ b/builtin/branch.c\n> @@ -39,6 +39,7 @@ static const char * const builtin_branch_usage[] = {\n>   \tN_(\"git branch [<options>] (-c | -C) [<old-branch>] <new-branch>\"),\n>   \tN_(\"git branch [<options>] [-r | -a] [--points-at]\"),\n>   \tN_(\"git branch [<options>] [-r | -a] [--format]\"),\n> +\tN_(\"git branch [<options>] --delete-merged\"),\n>   \tN_(\"git branch [<options>] (--delete-merged <pattern>)... \"\n>   \t   \"[<branch-pattern>...]\"),\n>   \tNULL\n> @@ -1029,9 +1030,16 @@ int cmd_branch(int argc,\n>   \t\tOPT_BOOL(0, \"create-reflog\", &reflog, N_(\"create the branch's reflog\")),\n>   \t\tOPT_BOOL(0, \"edit-description\", &edit_description,\n>   \t\t\t N_(\"edit the description for the branch\")),\n> -\t\tOPT_CALLBACK_F(0, \"delete-merged\", &delete_merged, N_(\"pattern\"),\n> -\t\t\tN_(\"delete merged branches whose upstream matches <pattern> (repeatable)\"),\n> -\t\t\tPARSE_OPT_NONEG, parse_opt_strvec),\n> +\t\t{\n> +\t\t\t.type = OPTION_CALLBACK,\n> +\t\t\t.long_name = \"delete-merged\",\n> +\t\t\t.value = &delete_merged,\n> +\t\t\t.argh = N_(\"pattern\"),\n> +\t\t\t.help = N_(\"delete merged branches whose upstream matches <pattern> (repeatable)\"),\n> +\t\t\t.flags = PARSE_OPT_LASTARG_DEFAULT | PARSE_OPT_NONEG,\n> +\t\t\t.callback = parse_opt_strvec,\n> +\t\t\t.defval = (intptr_t) \"**\",\n> +\t\t},\n>   \t\tOPT_BOOL(0, \"dry-run\", &dry_run,\n>   \t\t\tN_(\"with --delete-merged, only print which branches would be deleted\")),\n>   \t\tOPT__FORCE(&force, N_(\"force creation, move/rename, deletion\"), PARSE_OPT_NOCOMPLETE),\n> diff --git a/t/t3200-branch.sh b/t/t3200-branch.sh\n> index cdb6c6a634..e60f4794c8 100755\n> --- a/t/t3200-branch.sh\n> +++ b/t/t3200-branch.sh\n> @@ -2133,9 +2133,28 @@ test_expect_success '--delete-merged result is independent of stacked branch nam\n>   \t)\n>   '\n>   \n> -test_expect_success '--delete-merged requires a value' '\n> -\ttest_must_fail git -C forked branch --delete-merged 2>err &&\n> -\ttest_grep \"requires a value\" err\n> +test_expect_success '--delete-merged without a pattern matches every upstream' '\n> +\tsetup_repo_for_delete_merged &&\n> +\tcreate_merged_branch merged &&\n> +\t(\n> +\t\tcd repo &&\n> +\t\tgit branch --track local-topic main &&\n> +\t\tgit checkout --detach &&\n> +\n> +\t\tgit branch --dry-run --delete-merged &&\n> +\n> +\t\tcheck_branches <<-\\EOF &&\n> +\t\tlocal-topic\n> +\t\tmain\n> +\t\tmerged\n> +\t\tEOF\n> +\n> +\t\tgit branch --delete-merged &&\n> +\n> +\t\tcheck_branches <<-\\EOF\n> +\t\tmain\n> +\t\tEOF\n> +\t)\n>   '\n>   \n>   test_expect_success '--delete-merged honours branch.<name>.deleteMerged=false' '\n> \n> base-commit: a018953688f1b10bddf91bff8747068f5f4746a4\n\n"},{"id":"554110","messageId":"CAHwyqnXN=DZ_EzfTfxZ_==8HS7zX25NKoQw58Ou6HZELP_n+Qg@mail.gmail.com","threadId":"66450","inReplyTo":"ae47baff-daaa-4b78-97e9-94faebb8e694@gmail.com","subject":"Re: [PATCH] branch: let --delete-merged default to every upstream","fromName":"Harald Nordgren","fromEmail":"haraldnordgren@gmail.com","sentAt":"2026-10-04T13:16:46Z","receivedAt":"2026-10-04T13:17:24Z","isPatch":true,"body":"> With hindsight maybe\n>\n>         git branch --delete-merged [<upstream>...] -- [<branch>...]\n>\n> and\n>\n>         git branch --forked [<upstream>...] -- [<branch>...]\n>\n> would have been a better design. That's the sort of design mistake that\n> is much more likely to happen when a contributor sends an endless stream\n> of patches because they're eager to get something merged, rather than\n> engaging in a thoughtful discussion with the reviewer.\n\nI appreciate all the help here, but it's not necessary to throw blame\neither way. It sours the collaboration.\n\n\nHarald\n"},{"id":"554125","messageId":"79a242b0-ea1a-40d0-b1d2-8ef029fb0521@gmail.com","threadId":"66450","inReplyTo":"CAHwyqnXN=DZ_EzfTfxZ_==8HS7zX25NKoQw58Ou6HZELP_n+Qg@mail.gmail.com","subject":"Re: [PATCH] branch: let --delete-merged default to every upstream","fromName":"Phillip Wood","fromEmail":"phillip.wood123@gmail.com","sentAt":"2026-10-04T18:42:56Z","receivedAt":"2026-10-04T18:43:01Z","isPatch":true,"body":"Hi Harald\n\nOn 04/10/2026 14:16, Harald Nordgren wrote:\n>> With hindsight maybe\n>>\n>>          git branch --delete-merged [<upstream>...] -- [<branch>...]\n>>\n>> and\n>>\n>>          git branch --forked [<upstream>...] -- [<branch>...]\n>>\n>> would have been a better design. That's the sort of design mistake that\n>> is much more likely to happen when a contributor sends an endless stream\n>> of patches because they're eager to get something merged, rather than\n>> engaging in a thoughtful discussion with the reviewer.\n> \n> I appreciate all the help here, but it's not necessary to throw blame\n> either way. It sours the collaboration.\nI'm sorry if it sounded like I was blaming you. Getting a patch series \nmerged is a collaborative effort and any issues we discover later are \nthe collective responsibility of all those involved. I do though think \nit is helpful to think about what we can do to try and avoid design \nmistakes and feel that spending a bit more time discussing things and a \nbit less time re-rolling patches would help. I also think that would \nlikely end up with things getting merged sooner as, if we've had a \nreasonably detailed discussion about the design and implementation, \nwe're likely to have ironed out a lot of potential problems earlier in \nthe evolution of the patch series.\n\nThanks\n\nPhillip\n\n\n"},{"id":"554126","messageId":"CAHwyqnXuXWYWZ_c364-CpY8tmXjeTwGgYY=X8TtGs+2XbLbWHg@mail.gmail.com","threadId":"66450","inReplyTo":"79a242b0-ea1a-40d0-b1d2-8ef029fb0521@gmail.com","subject":"Re: [PATCH] branch: let --delete-merged default to every upstream","fromName":"Harald Nordgren","fromEmail":"haraldnordgren@gmail.com","sentAt":"2026-10-04T18:50:03Z","receivedAt":"2026-10-04T18:50:42Z","isPatch":true,"body":"> >> With hindsight maybe\n> >>\n> >>          git branch --delete-merged [<upstream>...] -- [<branch>...]\n> >>\n> >> and\n> >>\n> >>          git branch --forked [<upstream>...] -- [<branch>...]\n> >>\n> >> would have been a better design. That's the sort of design mistake that\n> >> is much more likely to happen when a contributor sends an endless stream\n> >> of patches because they're eager to get something merged, rather than\n> >> engaging in a thoughtful discussion with the reviewer.\n> >\n> > I appreciate all the help here, but it's not necessary to throw blame\n> > either way. It sours the collaboration.\n>\n> I'm sorry if it sounded like I was blaming you. Getting a patch series\n> merged is a collaborative effort and any issues we discover later are\n> the collective responsibility of all those involved. I do though think\n> it is helpful to think about what we can do to try and avoid design\n> mistakes and feel that spending a bit more time discussing things and a\n> bit less time re-rolling patches would help. I also think that would\n> likely end up with things getting merged sooner as, if we've had a\n> reasonably detailed discussion about the design and implementation,\n> we're likely to have ironed out a lot of potential problems earlier in\n> the evolution of the patch series.\n\nThat is fair. And you should know I am very thankful for the help and\nthe sometimes harsh feedback.\n\n\nHarald\n"},{"id":"554139","messageId":"xmqqld8cpya8.fsf@gitster.g","threadId":"66450","inReplyTo":"79a242b0-ea1a-40d0-b1d2-8ef029fb0521@gmail.com","subject":"Re: [PATCH] branch: let --delete-merged default to every upstream","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2026-10-05T04:27:27Z","receivedAt":"2026-10-05T04:27:30Z","isPatch":true,"body":"Phillip Wood <phillip.wood123@gmail.com> writes:\n\n> ... it is helpful to think about what we can do to try and avoid design \n> mistakes and feel that spending a bit more time discussing things and a \n> bit less time re-rolling patches would help. I also think that would \n> likely end up with things getting merged sooner ...\n\nI share the sentiment on both counts, even though I do not have a\nready reference/example to point at.  Thanks for pointing it out.\n\n"}]}