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

Re: Using git-update-index to add existing tree objects at other paths

From
Junio C Hamano <gitster@pobox.com>
Date
Oct 5, 2022, 19:39 UTC
Message-ID
<xmqq8rluoy9r.fsf@gitster.g>
In-Reply-To
<CAPx1GvfsRipG0qgDmMMoU+WCWCEyr4ayJteYWAy+EoJOoaNQXg@mail.gmail.com>
Chris Torek <chris.torek@gmail.com> writes:
Show 9 quoted lines
> On Tue, Oct 4, 2022 at 7:43 AM Sean Allred <allred.sean@gmail.com> wrote:
>> ... but the following does not work:
>>
>>     $ cat | git update-index --index-info
>>     040000 tree TREEID1 PATH1
>
> The index is not designed to hold tree objects (at least not at this level),
> and update-index should be fed only the full path names of files, symbolic
> links (mode 120000), or gitlinks (mode 160000).
Correct.

With the ongoing "sparse-index" work, it may not be an entirely unreasonable idea to extend the "update-index" command to allow it adding a tree entry there (after removing the entries that are for anything that fall inside that directory), but we are not there yet, in the sense that we haven't even discussed if doing it at this level is a reasonable thing to do.

Previous: Chris TorekNext: Phillip Wood
Message 3 of 4 in “Using git-update-index to add existing tree objects at other paths”
  1. Sean AllredOct 4, 2022
  2. Chris TorekOct 4, 2022
  3. Junio C HamanoOct 5, 2022
  4. Phillip WoodOct 4, 2022

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.