Download raw body.
got: allow clone without symrefs
On Sat, Jun 14, 2025 at 06:46:04PM +0200, Martijn van Duren wrote: > This diff works for me, and should make the default branch logic a > little more robust. But I'm not sure if the added complexity is worth > it: > - If we have a symref keep the logic as is. > - If we have a "HEAD", try to find a "master" or "main" branch of > the same id_str as "HEAD". > - If we have a "HEAD", but no id_str matching "master" or "main" branch, > default to the first "refs/heads/" branch that matches "HEAD"'s > id_str. > - If there is no "HEAD", try to find "master" or "main" branch of any > id_str. > - Give up and let the user use -b. > > I guess that "master" and "main" are common enough as main branch to > keep those as fallback, but let's see what sticks :-) I would prefer to drop all the checks involving "master" or "main" because those names are not part of the protocol spec. Checking for those names here looks like a layer violation. It would be an acceptable heuristic in scripts, but not in protocol implementations. Otherwise this logic looks fine to me.
got: allow clone without symrefs