From: Andrei Rybak Date: Thu, 17 Sep 2020 15:25:07 GMT Subject: Re: [PATCH 4/4] clone: allow configurable default for `-o`/`--origin` Message-ID: <83b5a9a0-6982-2bf7-139e-5cf2823f223c@gmail.com> In-Reply-To: <5c519376c29a28bd89a712cf0b8125fc1c2c81be.1599848727.git.gitgitgadget@gmail.com> On 2020-09-11 20:25, Sean Barag via GitGitGadget wrote: > From: Sean Barag > > 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. > 4. The default value of `origin` > > Signed-off-by: Sean Barag > Thanks-to: Junio C Hamano > Thanks-to: Johannes Schindelin