• T
    diff: tweak a _copy_ of diff_options with word-diff · 6440d341
    Thomas Rast 提交于
    When using word diff, the code sets the word_regex from various
    defaults if it was not set already.  The problem is that it does this
    on the original diff_options, which will also be used in subsequent
    diffs.
    
    This means that when the word_regex is not given on the command line,
    only the first diff for which a setting for word_regex (either from
    attributes or diff.wordRegex) ever takes effect.  This value then
    propagates to the rest of the diff runs and in particular prevents
    further attribute lookups.
    
    Fix the problem of changing diff state once and for all, by working
    with a _copy_ of the diff_options.
    Noticed-by: NJohannes Sixt <j6t@kdbg.org>
    Signed-off-by: NThomas Rast <trast@student.ethz.ch>
    Signed-off-by: NJunio C Hamano <gitster@pobox.com>
    6440d341
diff.c 126.4 KB