Subject: Re: [PATCH v2 1/2] status: show comparison with upstream default branch

From: "brian m. carlson" <[email-masked]>
Date: Wed, 24 Dec 2025 01:30:39 +0000

On 2025-12-23 at 22:54:07, Harald Nordgren via GitGitGadget wrote:
> +static char *get_default_remote_ref(char **full_ref_out)
> +{
> +	int flag;
> +	const char *resolved;
> +	static const char *remotes[] = { "upstream", "origin", NULL };

This should definitely be configurable, not hard-coded.  For instance, I
have this in my gitconfig:

    [clone]
        defaultRemoteName = def

so my default remote name is `def` (short for "default", as in the
default place to push) and this code will never work.

Another reason to have this be configurable is that some projects (like
a company I used to work at) have tooling that demands a specific remote
naming convention for tooling to work properly.  In this particular
case, `upstream` would have been the right choice, but I also worked at a
company where English was the common language.  Many people may prefer
to use names suitable to their local language.
-- 
brian m. carlson (they/them)
Toronto, Ontario, CA