git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: pasteley <ceasebeing@gmail.com>
Cc: Pasteley Absurda via GitGitGadget <gitgitgadget@gmail.com>,
	git@vger.kernel.org
Subject: Re: [PATCH] checkout: add remoteBranchTemplate config for DWIM branch names
Date: Tue, 23 Dec 2025 09:51:22 +0900	[thread overview]
Message-ID: <xmqqy0muqaut.fsf@gitster.g> (raw)
In-Reply-To: <7246f693-2047-4218-8103-8143e01032f0@gmail.com> (pasteley's message of "Mon, 22 Dec 2025 19:27:44 +0100")

pasteley <ceasebeing@gmail.com> writes:

> 1. Server-side policies/hooks that require a namespace on the remote
>     (e.g. `team/*`, `users/<id>/*`, `release/*`).
> 2. Hosting / mirroring setups where remote branches live under a fixed
>     prefix for organizational or access-control reasons.
> 3. Migrations where the remote branch layout is constrained by the
>     target system, while local developer workflows assume short names.
>
> In these scenarios developers do not create the problem, they inherit it.

Nobody stops you from interacting with projects like the above, and
locally name branches you store your work in users/pasteley/topic-1
instead of topic-1, no?

> While `push.default=matching` has been deprecated since Git 2.0 (~ 2014),
> we still can handle this corner case by detecting the incompatibility
> and providing a clear error message.

I do not know if you are confused, or if you are citing somebody
else's description that is confused, but the word "deprecated" in
the above statement is misused.  So is "corner case".

When we talk about deprecation, the deprecated feature is something
that is not useful for anybody to adopt because there are better
alternatives available, we wish there is no need to support the
users, and we hope we can remove it eventually someday.  The
matching push does not fall into that category at all.

What we did in Git 2.0 was to change the default from matching to
simple, because the matching is the most useful for those who
publish their changes, and for those who are merely participating
somebody else's project, it is not suited.  The matching push is
also harder to use properly if a project has multiple people who
push to a single repository (i.e., central repository approach).
The default was switched to make life easier for more people.  It
did not diminish the usefulness of the matching mode for the
developers for whom the matching was the most useful mode.

  reply	other threads:[~2025-12-23  0:51 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-21 15:59 [PATCH] checkout: add remoteBranchTemplate config for DWIM branch names Pasteley Absurda via GitGitGadget
2025-12-22  4:40 ` Junio C Hamano
2025-12-22 18:27   ` pasteley
2025-12-23  0:51     ` Junio C Hamano [this message]
2025-12-23  2:39       ` pasteley

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqqy0muqaut.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=ceasebeing@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitgitgadget@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).