Stefan Beller writes:
> Maybe we can enable Michaels heuristic with the same
> config/command line flag, i.e. "the flag changes its algorithm"?
I think that is a very sensible proposal. After all, the name
diff.compactionHeuristic only tells us what part of the diff process
the heuristic is use
> Is there a case where the compaction heuristic produces a better result
> than this indent heuristic? AFAICT, you have not found one, and I'd be
> surprised if there is one, because this _seems_ like a superset
> generally. I suppose there is always the possibility that the empirical
> knobs beha
On Sat, Aug 13, 2016 at 8:59 AM, Junio C Hamano wrote:
> Jeff King writes:
>
>> So assuming everything I just said isn't complete bollocks, I think we
>> can move to a future where nobody uses the compaction heuristic. And
>> there are three ways to deal with that:
>>
>> 1. The knob and feature
Jeff King writes:
> So assuming everything I just said isn't complete bollocks, I think we
> can move to a future where nobody uses the compaction heuristic. And
> there are three ways to deal with that:
>
> 1. The knob and feature stay. It might be useful for somebody who
> wants to exper
On Sat, Aug 13, 2016 at 01:25:05AM +0200, Michael Haggerty wrote:
> > These two flags are mutually exclusive in the xdiff code, so we should
> > probably handle that here.
> >
> > TBH, I do not care that much what:
> >
> > [diff]
> > compactionHeuristic = true
> > indentHeuristic = true
>
On 08/04/2016 06:55 PM, Stefan Beller wrote:
> [...]
> I have just reread the scoring function and I think you could pull out the
> `score=indent` assignment (it is always assigned except for indent <0)
>
> if (indent == -1)
>score = 0;
> else
>score
On 08/04/2016 09:52 PM, Junio C Hamano wrote:
> Michael Haggerty writes:
>> +#define START_OF_FILE_BONUS 9
>> +#define END_OF_FILE_BONUS 46
>> +#define TOTAL_BLANK_WEIGHT 4
>> +#define PRE_BLANK_WEIGHT 16
>> +#define RELATIVE_INDENT_BONUS -1
>> +#define RELATIVE_INDENT_HAS_BLANK_BONUS 15
>> +#defi
On 08/04/2016 09:56 AM, Jeff King wrote:
> On Thu, Aug 04, 2016 at 12:00:36AM +0200, Michael Haggerty wrote:
>
>> This table shows the number of diff slider groups that were positioned
>> differently than the human-generated values, for various repositories.
>> "default" is the default "git diff"
Michael Haggerty writes:
>> After
>> all, somebody in this file is already scanning each and every line
>> to see where it ends to split the input into records, so perhaps a
>> "right" (if the "theoretical correctness" of the return value from
>> this function mattered, which you wave-away below)
On 08/04/2016 02:04 AM, Stefan Beller wrote:
> On Wed, Aug 3, 2016 at 4:30 PM, Michael Haggerty wrote:
>> Stefan Beller wrote:
>>> [...]
>>> Rather the 10 describes the ratio of "advanced magic" to pure indentation
>>> based scoring in my understanding.
>>
>> No, it's basically just a number again
On 08/04/2016 09:39 PM, Junio C Hamano wrote:
> Michael Haggerty writes:
>
+ }
+ /*
+* We have reached the end of the line without finding any
non-space
+* characters; i.e., the whole line consists of trailing spaces,
which we
+
Michael Haggerty writes:
I agree with Peff about "comment on the voodoo upfront".
> +#define START_OF_FILE_BONUS 9
> +#define END_OF_FILE_BONUS 46
> +#define TOTAL_BLANK_WEIGHT 4
> +#define PRE_BLANK_WEIGHT 16
> +#define RELATIVE_INDENT_BONUS -1
> +#define RELATIVE_INDENT_HAS_BLANK_BONUS 15
> +#
Stefan Beller writes:
> I have just reread the scoring function and I think you could pull out the
> `score=indent` assignment (it is always assigned except for indent <0)
>
> if (indent == -1)
>score = 0;
> else
>score = indent;
> ... lots
Michael Haggerty writes:
>>> + }
>>> + /*
>>> +* We have reached the end of the line without finding any non-space
>>> +* characters; i.e., the whole line consists of trailing spaces,
>>> which we
>>> +* are not interested in.
>>> +*/
>>> + retur
On Thu, Aug 4, 2016 at 12:56 AM, Jeff King wrote:
> On Thu, Aug 04, 2016 at 12:00:36AM +0200, Michael Haggerty wrote:
>
>> This table shows the number of diff slider groups that were positioned
>> differently than the human-generated values, for various repositories.
>> "default" is the default "g
On Thu, Aug 04, 2016 at 12:00:36AM +0200, Michael Haggerty wrote:
> This table shows the number of diff slider groups that were positioned
> differently than the human-generated values, for various repositories.
> "default" is the default "git diff" algorithm. "compaction" is Git 2.9.0
> with the
On Wed, Aug 3, 2016 at 3:36 PM, Michael Haggerty wrote:
> On 08/04/2016 12:29 AM, Jacob Keller wrote:
>> On Wed, Aug 3, 2016 at 3:00 PM, Michael Haggerty
>> wrote:
>> It seems odd to be that a line with "199" spaces and nothing else will
>> return "-1" but a line with 200 spaces and nothing else
On Wed, Aug 3, 2016 at 4:30 PM, Michael Haggerty wrote:
> This is an important point for the optimization, but less so for the
> implementation of the heuristic here. I was dynamically optimizing the
> ten other variables, and everything that goes into the bonus includes
> one of those factors. I
On 08/04/2016 12:51 AM, Stefan Beller wrote:
> On Wed, Aug 3, 2016 at 3:41 PM, Michael Haggerty wrote:
>> On 08/04/2016 12:30 AM, Stefan Beller wrote:
>>> On Wed, Aug 3, 2016 at 3:00 PM, Michael Haggerty
>>> wrote:
>>>
+return 10 * score - bonus;
>>>
>>> Would it make sense to defin
On Wed, Aug 3, 2016 at 3:41 PM, Michael Haggerty wrote:
> On 08/04/2016 12:30 AM, Stefan Beller wrote:
>> On Wed, Aug 3, 2016 at 3:00 PM, Michael Haggerty
>> wrote:
>>
>>> +return 10 * score - bonus;
>>
>> Would it make sense to define-ify the 10 as well
>> as this is the only hardcoded
On 08/04/2016 12:30 AM, Stefan Beller wrote:
> On Wed, Aug 3, 2016 at 3:00 PM, Michael Haggerty wrote:
>
>> +return 10 * score - bonus;
>
> Would it make sense to define-ify the 10 as well
> as this is the only hardcoded number in the
> scoring function?
I started answering this questio
On 08/04/2016 12:29 AM, Jacob Keller wrote:
> On Wed, Aug 3, 2016 at 3:00 PM, Michael Haggerty wrote:
>> +/*
>> + * If a line is indented more than this, get_indent() just returns this
>> value.
>> + * This avoids having to do absurd amounts of work for data that are not
>> + * human-readable tex
On Wed, Aug 3, 2016 at 3:00 PM, Michael Haggerty wrote:
> +return 10 * score - bonus;
Would it make sense to define-ify the 10 as well
as this is the only hardcoded number in the
scoring function?
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message
On Wed, Aug 3, 2016 at 3:00 PM, Michael Haggerty wrote:
> +/*
> + * If a line is indented more than this, get_indent() just returns this
> value.
> + * This avoids having to do absurd amounts of work for data that are not
> + * human-readable text, and also ensures that the output of get_indent f
24 matches
Mail list logo