Download raw body.
change got clone's got.conf default branch setting
Stefan Sperling <stsp@stsp.name> wrote:
> The 'got clone' command generates a default configuration file
> which currently looks something like this:
> 
> remote "origin" {
> 	server git.example.com
> 	protocol ssh
> 	repository "/repo.git"
> 	branch { "main" }
> }
> 
> Where the "branch" directive applies to both 'got fetch' and 'got send'.
> 
> This can result in the default branch being sent even when that is not
> what the user intended. For example, when 'got send -d foo' is used to
> delete branch "foo", the above config file makes this command equivalent
> to 'got send -d foo -b main'.
> 
> The patch below avoids this issue in fresh clones by writing a got.conf
> like this instead:
> 
> remote "origin" {
> 	server git.example.com
> 	protocol ssh
> 	repository "/repo.git"
> 	fetch {
> 		branch { "main" }
> 	}
> }
> 
> 
> If 'got send -d foo' is used with the above got.conf then it will
> really only delete branch "foo" and not send anything else. This is
> because we only get a default branch from the work tree or the
> repository if the -d option is not used.
> 
> ok?
Yes, yes, yes!  Thank you! :)
I completely forgot about the `fetch' stanza.
ok op@
change got clone's got.conf default branch setting