git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v2 1/2] connected: document connectivity in partial clones

From
Junio C Hamano <gitster@pobox.com>
Date
Sep 21, 2018, 20:19 UTC
Message-ID
<xmqqmusavc1h.fsf@gitster-ct.c.googlers.com>
In-Reply-To
<14153be920095f5fc8c11da33d5d27469e3a0f39.1537553700.git.jonathantanmy@google.com>
Jonathan Tan <jonathantanmy@google.com> writes:
Show 11 quoted lines
> In acb0c57260 ("fetch: support filters", 2017-12-08), check_connected()
> was extended to allow objects to either be promised to be available (if
> the repository is a partial clone) or to be present; previously, this
> function required the latter. However, this change was not reflected in
> the documentation of that function. Update the documentation
> accordingly.
>
> Signed-off-by: Jonathan Tan <jonathantanmy@google.com>
> ---
>  connected.h | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)

Very much makes sense. I think this is sufficient clarification to allay your earlier worry of having to have a huge in-code comment to prevent the "must exist" loop from getting removed.

Show 17 quoted lines
> diff --git a/connected.h b/connected.h
> index e4c961817..8d5a6b3ad 100644
> --- a/connected.h
> +++ b/connected.h
> @@ -51,9 +51,9 @@ struct check_connected_options {
>  #define CHECK_CONNECTED_INIT { 0 }
>  
>  /*
> - * Make sure that our object store has all the commits necessary to
> - * connect the ancestry chain to some of our existing refs, and all
> - * the trees and blobs that these commits use.
> + * Make sure that all given objects and all objects reachable from them
> + * either exist in our object store or (if the repository is a partial
> + * clone) are promised to be available.
>   *
>   * Return 0 if Ok, non zero otherwise (i.e. some missing objects)
>   *
Previous: Jonathan TanNext: Jonathan Tan
Message 7 of 8 in “fetch: in partial clone, check presence of targets”
  1. fetch: in partial clone, check presence of targetsJonathan Tan, Sep 20, 2018
  2. Junio C HamanoSep 20, 2018
  3. Jonathan TanSep 20, 2018
  4. Junio C HamanoSep 20, 2018
  5. 0/2 Check presence of targets when fetching to partial cloneJonathan Tan, Sep 21, 2018
  6. 1/2 connected: document connectivity in partial clonesJonathan Tan, Sep 21, 2018
  7. Junio C HamanoSep 21, 2018
  8. 2/2 fetch: in partial clone, check presence of targetsJonathan Tan, Sep 21, 2018

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.