Web lists-archives.com

Re: js/difftool-no-index, was Re: What's cooking in git.git (May 2019, #02; Tue, 14)

Johannes Schindelin <Johannes.Schindelin@xxxxxx> writes:

> Hi Junio,
> On Tue, 14 May 2019, Junio C Hamano wrote:
>> * js/difftool-no-index (2019-05-09) 1 commit
>>  - difftool --no-index: error out on --dir-diff (and don't crash)
>>  The "--dir-diff" mode of "git difftool" is not useful in "--no-index"
>>  mode; they are now explicitly marked as mutually incompatible.
>>  Will merge to 'next'.
> Seeing as the following is a part of v2.22.0-rc0's release notes:
> 	 * "git difftool" can now run outside a repository.
> maybe we could get this to `master` instead of `next`?

There is no 'instead of'.  Topics advance one step at a time.

I do not recall seeing you respond to my review comments on the
"error out" patch <xmqqv9ykdr1w.fsf@xxxxxxxxxxxxxxxxxxxxxxxxx>, but
thinking about it further, assuming that my rephrasing of your
justification in my review was correct, I wonder if it is even more
correct if we do not error out but simply behave as if "--dir-diff"
option were not given.

That is, if there were some way to distinguish tracked and untracked
paths in --no-index mode, --dir-diff would copy only the tracked parts
to temporary directories and run tree comparison.  Since there is no
"untracked paths" by definition in --no-index mode, we do not even
have to make copies but just compare the two directories given using
the same tree comparison tool.

Wouldn't that be more useful behaviour than telling the end users to
run the backend tree comparison tool themselves?