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

Re: [PATCH 2/2] repack: repack promisor objects if -a or -A is set

From
JTJonathan Tan <jonathantanmy@google.com>
Date
Aug 7, 2018, 23:25 UTC
Message-ID
<20180807232528.182492-1-jonathantanmy@google.com>
In-Reply-To
<xmqq7el1kdlt.fsf@gitster-ct.c.googlers.com>
Show 23 quoted lines
> Just a note (and a request-for-sanity-check) and not meant to be a
> request to update the code, but with a still-in-pu 4b757a40 ("Use
> remote_odb_get_direct() and has_remote_odb()", 2018-08-02) in
> flight, repository_format_partial_clone is now gone.
> 
> I've tentatively resolved the above to read like so:
> 
> 		if (has_remote_odb())
> 			repack_promisor_objects(&po_args, &names);
> 
> but I am not sure if it makes sense to always require odb helper to
> be present for any promisor.  As long as you do not have need to
> actually access these missing objects, you do not need any remote
> odb access at all, in which case requiring has_remote_odb() as a
> precondition to concatenate the promisor packs to coalesce them into
> one pack does not make sense---you only want to know if there are
> any .promisor packs.
> 
> In other words, I suspect that the world is not black (i.e. partial
> clone, which always has remote-odb) and white (i.e. full repository,
> without remote-odb).  4b757a40 makes it impossible to have a gray
> (i.e. partial clone, but no access to remote-odb), which I am not
> sure if it is a good thing.

Thanks for the heads-up. This makes me realize that even the current precondition (repository_format_partial_clone) is not an exact one - I should only be doing this if I know that there is at least one promisor object (if not, in the rare case that a repo is configured to be partial but does not have any promisor objects, repack will generate an empty packfile). In the next reroll, I'll take care of this, which should avoid this merge issue too.

Previous: Junio C HamanoNext: Junio C Hamano
Message 11 of 18 in “Repacking of promisor packfiles”
  1. 0/2 Repacking of promisor packfilesJonathan Tan, Aug 7, 2018
  2. 1/2 repack: refactor setup of pack-objects cmdJonathan Tan, Aug 7, 2018
  3. 2/2 repack: repack promisor objects if -a or -A is setJonathan Tan, Aug 7, 2018
  4. Junio C HamanoAug 7, 2018
  5. Jonathan TanAug 7, 2018
  6. Junio C HamanoAug 8, 2018
  7. Jonathan TanAug 8, 2018
  8. Jeff KingAug 8, 2018
  9. Junio C HamanoAug 8, 2018
  10. Junio C HamanoAug 7, 2018
  11. Jonathan TanAug 7, 2018
  12. Junio C HamanoAug 8, 2018
  13. 0/2 Repacking of promisor packfilesJonathan Tan, Aug 8, 2018
  14. 1/2 repack: refactor setup of pack-objects cmdJonathan Tan, Aug 8, 2018
  15. 2/2 repack: repack promisor objects if -a or -A is setJonathan Tan, Aug 8, 2018
  16. Junio C HamanoAug 9, 2018
  17. Jonathan TanAug 9, 2018
  18. Duy NguyenAug 18, 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.