From: Junio C Hamano <gitster@pobox.com>
To: Chris Torek <chris.torek@gmail.com>
Cc: Sean Allred <allred.sean@gmail.com>, git <git@vger.kernel.org>
Subject: Re: Using git-update-index to add existing tree objects at other paths
Date: Wed, 05 Oct 2022 12:39:44 -0700 [thread overview]
Message-ID: <xmqq8rluoy9r.fsf@gitster.g> (raw)
In-Reply-To: <CAPx1GvfsRipG0qgDmMMoU+WCWCEyr4ayJteYWAy+EoJOoaNQXg@mail.gmail.com> (Chris Torek's message of "Tue, 4 Oct 2022 08:10:25 -0700")
Chris Torek <chris.torek@gmail.com> writes:
> 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.
next prev parent reply other threads:[~2022-10-05 19:39 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-04 13:44 Using git-update-index to add existing tree objects at other paths Sean Allred
2022-10-04 15:10 ` Chris Torek
2022-10-05 19:39 ` Junio C Hamano [this message]
2022-10-04 15:13 ` Phillip Wood
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqq8rluoy9r.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=allred.sean@gmail.com \
--cc=chris.torek@gmail.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).