Re: [PATCH 4/4] clone: allow configurable default for `-o`/`--origin`
On 2020-09-11 20:25, Sean Barag via GitGitGadget wrote:
Show 14 quoted lines
> From: Sean Barag <sean@barag.org>
>
> While the default remote name of "origin" can be changed at clone-time
> with `git clone`'s `--origin` option, it was previously not possible
> to specify a default value for the name of that remote. This commit
> adds support for a new `clone.defaultRemoteName` config.
>
> It's resolved in the expected priority order:
>
> 1. (Highest priority) A remote name passed directly to `git clone -o`
> 2. A `clone.defaultRemoteName=new_name` in config `git clone -c`
> 3. A `clone.defaultRemoteName` value set in `/path/to/template/config`,
> where `--template=/path/to/template` is provided
> 3. A `clone.defaultRemoteName` value set in a non-template config file
Number 3 is used twice in this list.
Show 5 quoted lines
> 4. The default value of `origin`
>
> Signed-off-by: Sean Barag <sean@barag.org>
> Thanks-to: Junio C Hamano <gitster@pobox.com>
> Thanks-to: Johannes Schindelin <johannes.schindelin@gmx.de>