Subject: Re: [PATCH 14/16] mktree: optionally add to an existing tree

From: Junio C Hamano <[email-masked]>
Date: Wed, 12 Jun 2024 12:50:32 -0700

Patrick Steinhardt <[email-masked]> writes:

> On Tue, Jun 11, 2024 at 06:24:46PM +0000, Victoria Dye via GitGitGadget wrote:
>> diff --git a/Documentation/git-mktree.txt b/Documentation/git-mktree.txt
>> index afbc846d077..99abd3c31a6 100644
>> --- a/Documentation/git-mktree.txt
>> +++ b/Documentation/git-mktree.txt
>> @@ -40,6 +40,11 @@ OPTIONS
>>  	optional.  Note - if the `-z` option is used, lines are terminated
>>  	with NUL.
>>  
>> +<tree-ish>::
>> +	If provided, the tree entries provided in stdin are added to this tree
>> +	rather than a new empty one, replacing existing entries with identical
>> +	names. Not compatible with `--literally`.
>
> I think it'd be a bit more intuitive is this was an option, like
> `--base-tree=` or just `--base=`.
>
> One question that comes up naturally in this context: when I have a base
> tree, how do I remove entries from it?

Presumably the same way how you remove entries with "update-index --index-info"?
I.e. mode=0 entry in the input would serve as a signal to remove the
path?