From: Chris Torek Date: Tue, 04 Oct 2022 15:10:25 GMT Subject: Re: Using git-update-index to add existing tree objects at other paths Message-ID: In-Reply-To: <87o7ur1wi9.fsf@gmail.com> On Tue, Oct 4, 2022 at 7:43 AM Sean Allred 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). Whether it's reasonable to ask for the update-index command to understand that `040000 tree ` means to insert all the files *within* the given (existing) tree object, at the implied constructed paths, I'll leave as an open topic here. :-) But if you were to do this manually yourself, it should work. Chris