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

From:
Stefan Sperling <stsp@stsp.name>
Subject:
Re: special case 'got fetch -b <branch>' + regress
To:
Mark Jamsek <mark@jamsek.com>
Cc:
Game of Trees <gameoftrees@openbsd.org>
Date:
Mon, 13 Feb 2023 12:49:35 +0100

Download raw body.

Thread
On Mon, Feb 13, 2023 at 02:23:01AM +1100, Mark Jamsek wrote:
> At present, we cover 'got fetch' from:
> 
>   - repo: got.conf branch that exists on remote (fetches got.conf only)
>   - repo: -b branch that exists on remote (fetches -b only)
>   - repo: -b branch that doesn't exist on remote (fetches none)
>   - repo: got.conf branch that doesn't exist (fallback to remote HEAD)
>   - wt: got.conf that doesn't exist, wt that does exist (fetches wt only)
>   - wt: got.conf and wt branches that both exist (fetches conf and wt)
>   - wt: -b branch that does exist on the remote (fetches -b only)
>   - wt: -b branch that doesn't exist on the remote (fetches none)

Thanks! It is nice to see more test coverage added in particular.

I think you should commit this and we'll keep iterating on top.
There were ideas about "always fetching HEAD" (specifics pending), which
this patch does not seem to implement. But we should keep building on top
of this diff in any case.
Without good test coverage it would be harder to decide what we really want.

> As a related change, I'll follow up (tomorrow) with a diff that improves
> the output when requesting a branch with 'got fetch -b' that does not
> exist. Currently, we report:
> 
>   got-fetch-pack: could not find any branches to fetch
>   got: could not find any branches to fetch

Ah, yes, agreed. It would be good to reinstate this change.