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

Re: [PATCH v2 4/8] sha1_file: new object source for submodule's alt object database

From
Eric Sunshine <sunshine@sunshineco.com>
Date
Apr 30, 2013, 06:07 UTC
Message-ID
<CAPig+cRamwcEkdNYPr5EZnh83a1GpMKS-4bpLXKkotVMJwftkA@mail.gmail.com>
In-Reply-To
<1367293372-1958-5-git-send-email-pclouds@gmail.com>

On Mon, Apr 29, 2013 at 11:42 PM, Nguyễn Thái Ngọc Duy <pclouds@gmail.com> wrote:

Show 17 quoted lines
> This patch separates submodule odb sources from ordinary alternate
> sources. The new sources can be accessed with ODB_EXTALT (e.g. via
> read_sha1_file_extended).
>
> ODB_EXTALT is only added to odb_default in certain cases. Basically:
>
>  - External commands do not access submodule odb by default
>  - unpack-objects, index-pack and rev-list do not
>  - All other builtin commands do
>
> unpack-objects, index-pack and rev-list take new objects from outside
> and have to make sure the repository is still in good state. They
> should not pay attention to submodule's odb, especially rev-list
> because it does connectivity check.
>
> External commands also do not have default access to submodule odb,
> simply because I see no reasons why the should. They don't usually
s/the should/they should/
Show 8 quoted lines
> play a big role in the user front, where submodule integration happens
> and requires looking into submodule odb.
>
> The die() in add_submodule_odb() may be too strong. There might be a
> use case where somebody wants to add_submodule_odb() and look some up
> with read_sha1_file_extended() even if odb_default does not contain
> ODB_EXTALT. Right now such a use case may need to work around die() by
> temporarily adding ODB_EXTALT to odb_default. Not nice, but as no such
s/as// perhaps?
> use case exists yet to worry about.
>
> Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Previous: Nguyễn Thái Ngọc DuyNext: Nguyễn Thái Ngọc Duy
Message 8 of 14 in “Some object db protection when add_submodule_odb is used”
  1. 0/8 Some object db protection when add_submodule_odb is usedNguyễn Thái Ngọc Duy, Apr 30, 2013
  2. 1/8 sha1_file: allow to select pack origin when looking up an objectNguyễn Thái Ngọc Duy, Apr 30, 2013
  3. Eric SunshineApr 30, 2013
  4. 2/8 sha1_file: keep track of alternate source of objectsNguyễn Thái Ngọc Duy, Apr 30, 2013
  5. 3/8 sha1_file: mark alt object database from add_submodule_odb()Nguyễn Thái Ngọc Duy, Apr 30, 2013
  6. Eric SunshineApr 30, 2013
  7. 4/8 sha1_file: new object source for submodule's alt object databaseNguyễn Thái Ngọc Duy, Apr 30, 2013
  8. Eric SunshineApr 30, 2013
  9. 5/8 commit.c: refuse to write commits referring to external objectsNguyễn Thái Ngọc Duy, Apr 30, 2013
  10. 6/8 cache-tree.c: refuse to write trees referring to external objectsNguyễn Thái Ngọc Duy, Apr 30, 2013
  11. 7/8 mktag: refuse to write tags referring to external objectsNguyễn Thái Ngọc Duy, Apr 30, 2013
  12. 8/8 sha1_file: do write objects even if found in ODB_EXTALT databaseNguyễn Thái Ngọc Duy, Apr 30, 2013
  13. Thomas RastApr 30, 2013
  14. Duy NguyenApr 30, 2013

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.