Re: compactionHeuristic=true is not used by interactive staging

2016-06-15 Thread Alex Prengère
I see, it makes sense ;-) Indeed it would seem logical to have all
commands showing diffs (diff, add -p, log -p, reset -p, etc..) respect
the diff options.

Thanks for your quick answer!

2016-06-14 23:45 GMT+02:00 Junio C Hamano :
> Jeff King  writes:
>
>> Nobody noticed so far because originally the compaction heuristic was on
>> by default, and so just worked everywhere. But we backed off on that at
>> the last minute after finding a few cases where the diff looks worse.
>
> Yup, and that is why this is called "experimental" in the release
> notes ;-)
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: compactionHeuristic=true is not used by interactive staging

2016-06-14 Thread Junio C Hamano
Jeff King  writes:

> Nobody noticed so far because originally the compaction heuristic was on
> by default, and so just worked everywhere. But we backed off on that at
> the last minute after finding a few cases where the diff looks worse.

Yup, and that is why this is called "experimental" in the release
notes ;-)
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: compactionHeuristic=true is not used by interactive staging

2016-06-14 Thread Jeff King
On Tue, Jun 14, 2016 at 04:22:54PM +0200, Alex Prengère wrote:

> Hello,
> I just did a fresh clone of git from Github and installed the version
> 2.9.0 on Fedora 22.
> 
> I tried the new compactionHeuristic = true, which is awesome.
> The only thing that struck me was that this option was not used when
> doing an interactive staging, meaning `git diff` and `git add -p` will
> format patches differently. Perhaps this is intended and there is a
> way to force interactive staging to use specific diff options, but I
> did not find it in the doc.

That's because it's handled in the "UI config", and plumbing commands
are not affected (and "add -p" is built on plumbing commands). The same
is true of diff.algorithm, for instance.

To make this work, add--interactive would have to manually enable
particular options that it thinks it can handle (and in fact this is
done with diff.algorithm already). So we'd need a patch similar to
2cc0f53 (add--interactive: respect diff.algorithm, 2013-06-12).

Nobody noticed so far because originally the compaction heuristic was on
by default, and so just worked everywhere. But we backed off on that at
the last minute after finding a few cases where the diff looks worse.

-Peff
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


compactionHeuristic=true is not used by interactive staging

2016-06-14 Thread Alex Prengère
Hello,
I just did a fresh clone of git from Github and installed the version
2.9.0 on Fedora 22.

I tried the new compactionHeuristic = true, which is awesome.
The only thing that struck me was that this option was not used when
doing an interactive staging, meaning `git diff` and `git add -p` will
format patches differently. Perhaps this is intended and there is a
way to force interactive staging to use specific diff options, but I
did not find it in the doc.

Thanks,
Alex
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html