"GOT", but the "O" is a cute, smiling pufferfish. Index | Thread | Search

From:
Mark Jamsek <mark@jamsek.com>
Subject:
Re: improve got fetch error reporting
To:
gameoftrees@openbsd.org
Date:
Sun, 5 Feb 2023 17:34:11 +1100

Download raw body.

Thread
On 23-02-04 05:34PM, Stefan Sperling wrote:
> With the new 'got fetch' default behaviour it can be a bit
> unclear why the fetch operation is failing:
> 
> $ got fetch
> got-fetch-pack: could not find any branches to fetch
> got: could not find any branches to fetch
> $ got branch
> fetch-verify
> 
> 
> With the patch below:
> 
> $ got fetch
> got-fetch-pack: branch "refs/heads/fetch-verify" not found on server: could not find any branches to fetch
> got: could not find any branches to fetch
> $
> 
> ok?

yes, good idea! ok for me too

On the topic of got's new fetch behaviour, do you think it would be a
good idea to fallback to the branch resolved by the remote's HEAD ref
if 'got fetch' is run in a work tree without -b?

So, 'got fetch' will first attempt to fetch the work tree's current
branch, but if not found it will fetch the remote repository's HEAD.

-- 
Mark Jamsek <fnc.bsdbox.org>
GPG: F2FF 13DE 6A06 C471 CA80  E6E2 2930 DC66 86EE CF68