git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 1/2] diff: do not display hunk context under -W

From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Date
Feb 15, 2021, 19:24 UTC
Message-ID
<87im6tb0ca.fsf@evledraar.gmail.com>
In-Reply-To
<d02c99b8-ae26-9804-480c-eae880f4a6cb@web.de>
On Mon, Feb 15 2021, René Scharfe. wrote:
Show 73 quoted lines
> Am 15.02.21 um 16:50 schrieb Ævar Arnfjörð Bjarmason:
>> Fix what I believe to be a long-standing bug in how "-W" interacts
>> with displaying the hunk context on the @@ line: It should not be
>> displayed at all under -W.
>>
>> The long-standing semantics of how -W works and interacts with -U<n>
>> are rather easy to reason about:
>>
>>  * -W extends the context line up to the start of the function. With
>>     userdiff this means the language-aware regex rules in userdiff.c,
>>     or user-supplied rules.
>>
>>  * -U<n>, which defaults to -U3 shows at least <n> lines of context,
>>     if that's greater than what we'd extend the context to under -W
>>     then -U<n> wins.
>>
>>  * When showing the hunk context we look up from the first line we
>>    show of the diff, and find whatever looks like useful context above
>>    that line.
>>
>> Thus in e.g. the xdiff/xemit.c change being made in this commit we'll
>> correctly show "xdl_emit_diff()" in the hunk context under default
>> diff settings.
>>
>> But if we viewed it with the -W option we'd show "is_empty_rec()",
>> because we'd first find the "xdl_emit_diff()" context line, extend the
>> diff to that, and then would go look for context to show again.
>>
>> I don't think this behavior makes any sense, our context in this case
>> is what we're guaranteed to show as part of the diff itself.
>>
>> The user already asked us to find that context line and show it, we
>> don't need to then start showing the context above that line, which
>> they didn't ask for.
>
> Hmm, that's subtle.
>
> Your reasoning applies to patches generated without -W as well.  If the
> precontext contains a function line then the @@ line should not contain
> a function comment.  However, e.g. with this:
>
> -- snip --
> cat >a <<EOF
> func a
>
> func b
> 1
> 2
> 3
> EOF
> sed 's/3/three/' <a >b
> diff -up a b
> -- snap --
>
> ... I get this:
>
> --- a	2021-02-15 18:30:21.000000000 +0100
> +++ b	2021-02-15 18:30:21.000000000 +0100
> @@ -3,4 +3,4 @@ func a
>  func b
>  1
>  2
> -3
> +three
>
> So diff(1) shows the previous function line.  git diff does the same.
>
> The behaviour of diff(1) and git diff does make sense to me: It's easy
> to implement and the only downside is that it produces extra output in
> some cases.
>
> I can understand that users would rather have a tidy diff without
> distractions, though.  So I like the output change you propose.

Does GNU diff have something like git's -W, both "diff -U 0 -F func a b" and "diff -U 0 -p a b" don't extend the context window as we do.

I don't think the patch I'm submitting here would make sense for GNU diff, since there it just shows the context without being guaranteed to show the full set of lines leading up to it under -W, but with Git diff we do that, so I think it makes sense to omit the context.

> However, I'm not sure it would be a good idea to clear @@ lines of hunks
> generated without -W that have function lines in their precontext, even
> though it would be a logical thing to do.

Yes, I don't think that's a good idea either. I think it only makes sense under -W where the user explicitly asks "show me the function this change was in", and we're (before this patch) showing different context on the basis of emergent behavior.

Show 7 quoted lines
>> This new behavior does give us the edge case that if we e.g. view the
>> diff here with "-U150 -W" we'd previously extend the context to the
>> middle of the "is_func_rec()" function, and show that function in the
>> hunk context. Now we'll show nothing.
>
> Well, the 150 lines of context are still shown (as they should be), but
> the @@ line contains no function name anymore.

Yes, indeed. I'll reword that to "now we'll show no context in that case" or something...

Show 8 quoted lines
>> I think that change also makes sense. We're showing a change in the
>> "xdl_emit_diff()" function. That's our context for the change. It
>> doesn't make sense with -W to start fishing around for other
>> context.
>
> It does make sense in the context of the diff(1) -p implementation, but
> your change is consistent with the description of that option: "Show
> which C function each change is in."
I hadn't spotted that, we just said:
    Show whole function as context lines for each change. The function
    names are determined in the same way as git diff works out patch
    hunk headers

Which I think can more obviously be read as the existing behavior being desired, and this patch being a change to documented behavior.

(I think it is, I just think it makes sense to change the docs & behavior int this case)

Show 12 quoted lines
>> Arguably in that case we could save away the context we found in the
>> "XDL_EMIT_FUNCCONTEXT" in "xdl_emit_diff()" and show that if we end up
>> extending the diff past the function, either because of a high -U<n>
>> value, or because our change was right at the start.
>>
>> I wouldn't really mind if we did that, perhaps it would be a useful
>> marker with high -U<n> values to remind the user of what they're
>> looking at, but I also don't see the usefulness in practice, so let's
>> punt that for now.
>
> It could be confusing for someone who expects the old behaviour, leaving
> it empty makes more sense to me.
FWIW it would be useful for:
    git log -U1000 -W

And then searching for "@@" in the pager to find changes to specific functions.

Show 70 quoted lines
>>
>> Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
>> ---
>>  Documentation/diff-options.txt | 4 ++++
>>  t/t4015-diff-whitespace.sh     | 2 +-
>>  t/t4018-diff-funcname.sh       | 7 +++++++
>>  xdiff/xemit.c                  | 4 +++-
>>  4 files changed, 15 insertions(+), 2 deletions(-)
>>
>> diff --git a/Documentation/diff-options.txt b/Documentation/diff-options.txt
>> index e5733ccb2d..8ca59effa7 100644
>> --- a/Documentation/diff-options.txt
>> +++ b/Documentation/diff-options.txt
>> @@ -759,6 +759,10 @@ endif::git-format-patch[]
>>  	The function names are determined in the same way as
>>  	`git diff` works out patch hunk headers (see 'Defining a
>>  	custom hunk-header' in linkgit:gitattributes[5]).
>> ++
>> +When showing the whole function for context the "@@" context line
>> +itself will always be empty, since the context that would otherwise be
>> +shown there will be the first line of the hunk being shown.
>>
>>  ifndef::git-format-patch[]
>>  ifndef::git-log[]
>> diff --git a/t/t4015-diff-whitespace.sh b/t/t4015-diff-whitespace.sh
>> index 8c574221b2..0ffc845cdd 100755
>> --- a/t/t4015-diff-whitespace.sh
>> +++ b/t/t4015-diff-whitespace.sh
>> @@ -2133,7 +2133,7 @@ test_expect_success 'combine --ignore-blank-lines with --function-context 2' '
>>  		--ignore-blank-lines --function-context a b >actual.raw &&
>>  	sed -n "/@@/,\$p" <actual.raw >actual &&
>>  	cat <<-\EOF >expect &&
>> -	@@ -5,11 +6,9 @@ c
>> +	@@ -5,11 +6,9 @@
>>  	 function
>>  	 1
>>  	 2
>> diff --git a/t/t4018-diff-funcname.sh b/t/t4018-diff-funcname.sh
>> index 80f35c5e16..f3374abd98 100755
>> --- a/t/t4018-diff-funcname.sh
>> +++ b/t/t4018-diff-funcname.sh
>> @@ -91,6 +91,13 @@ test_diff_funcname () {
>>  		fi
>>  	' &&
>>
>> +	test_expect_success "$desc -W" '
>> +		git diff -U0 -W "$what" >W-U0-diff &&
>> +		echo >W-U0-expected &&
>> +		last_diff_context_line W-U0-diff >W-U0-actual &&
>> +		test_cmp W-U0-expected W-U0-actual
>> +	' &&
>> +
>>  	test_expect_success "$desc (accumulated)" '
>>  		git diff -U1 "$what".acc >diff &&
>>  		last_diff_context_line diff >actual.lines &&
>> diff --git a/xdiff/xemit.c b/xdiff/xemit.c
>> index 9d7d6c5087..02b5dbcc70 100644
>> --- a/xdiff/xemit.c
>> +++ b/xdiff/xemit.c
>> @@ -274,7 +274,9 @@ int xdl_emit_diff(xdfenv_t *xe, xdchange_t *xscr, xdemitcb_t *ecb,
>>  		 */
>>
>>  		if (xecfg->flags & XDL_EMIT_FUNCNAMES) {
>> -			get_func_line(xe, xecfg, &func_line,
>> +			get_func_line(xe, xecfg,
>> +				      xecfg->flags & XDL_EMIT_FUNCCONTEXT
>> +				      ? NULL : &func_line,
>
> Why still search?  It would be better to turn off XDL_EMIT_FUNCNAMES if
> XDL_EMIT_FUNCCONTEXT is enabled -- a one-character change in diff.c.
I just didn't read the diff/xdiff code carefully enough. Will fix.
>>  				      s1 - 1, funclineprev);
>>  			funclineprev = s1 - 1;
>>  		}
>>
Previous: René Scharfe.Next: René Scharfe.
Message 18 of 192 in “userdiff: add support for Emacs Lisp”
  1. userdiff: add support for Emacs LispAdam Spiers, Feb 13, 2021
  2. Ævar Arnfjörð BjarmasonFeb 14, 2021
  3. Johannes SixtFeb 14, 2021
  4. Johannes SixtFeb 14, 2021
  5. Ævar Arnfjörð BjarmasonFeb 14, 2021
  6. 01/20 userdiff: refactor away the parse_bool() functionÆvar Arnfjörð Bjarmason, Feb 15, 2021
  7. 03/20 userdiff: add and use for_each_userdiff_driver()Ævar Arnfjörð Bjarmason, Feb 15, 2021
  8. 02/20 userdiff: re-order builtin drivers in alphabetical orderÆvar Arnfjörð Bjarmason, Feb 15, 2021
  9. 00/20 userdiff: refactor + test + doc + misc improvementsÆvar Arnfjörð Bjarmason, Feb 15, 2021
  10. 02/27 userdiff style: re-order drivers in alphabetical orderÆvar Arnfjörð Bjarmason, Feb 15, 2021
  11. 01/27 userdiff: refactor away the parse_bool() functionÆvar Arnfjörð Bjarmason, Feb 15, 2021
  12. 00/27 userdiff: refactor + test + doc + misc improvementsÆvar Arnfjörð Bjarmason, Feb 15, 2021
  13. 0/2 diff: do not display hunk context under -WÆvar Arnfjörð Bjarmason, Feb 15, 2021
  14. 2/2 diff: test and document -W interaction with -U<n>Ævar Arnfjörð Bjarmason, Feb 15, 2021
  15. Johannes SixtFeb 16, 2021
  16. 1/2 diff: do not display hunk context under -WÆvar Arnfjörð Bjarmason, Feb 15, 2021
  17. René Scharfe.Feb 15, 2021
  18. Ævar Arnfjörð BjarmasonFeb 15, 2021
  19. René Scharfe.Feb 15, 2021
  20. Junio C HamanoFeb 16, 2021
  21. Junio C HamanoFeb 16, 2021
  22. Johannes SixtFeb 16, 2021
  23. Junio C HamanoFeb 16, 2021
  24. Eric SunshineFeb 15, 2021
  25. Johannes SixtFeb 15, 2021
  26. 00/35 20210215154427.32693-1-avarab@gmail.comÆvar Arnfjörð Bjarmason, Feb 24, 2021
  27. Johannes SixtFeb 27, 2021
  28. Johannes SixtFeb 28, 2021
  29. Ævar Arnfjörð BjarmasonFeb 28, 2021
  30. Johannes SixtMar 1, 2021
  31. 00/10 userdiff: refactor + test improvementsÆvar Arnfjörð Bjarmason, Mar 24, 2021
  32. 01/10 userdiff: refactor away the parse_bool() functionÆvar Arnfjörð Bjarmason, Mar 24, 2021
  33. Jeff KingMar 24, 2021
  34. 02/10 userdiff style: re-order drivers in alphabetical orderÆvar Arnfjörð Bjarmason, Mar 24, 2021
  35. 06/10 userdiff tests: explicitly test "default" patternÆvar Arnfjörð Bjarmason, Mar 24, 2021
  36. 04/10 userdiff style: normalize pascal regex declarationÆvar Arnfjörð Bjarmason, Mar 24, 2021
  37. 08/10 userdiff: remove support for "broken" testsÆvar Arnfjörð Bjarmason, Mar 24, 2021
  38. 05/10 userdiff: add and use for_each_userdiff_driver()Ævar Arnfjörð Bjarmason, Mar 24, 2021
  39. Junio C HamanoMar 24, 2021
  40. Jeff KingMar 24, 2021
  41. Junio C HamanoMar 24, 2021
  42. Jeff KingMar 24, 2021
  43. Ævar Arnfjörð BjarmasonMar 24, 2021
  44. Jeff KingMar 25, 2021
  45. Ævar Arnfjörð BjarmasonMar 25, 2021
  46. Jeff KingMar 26, 2021
  47. Ævar Arnfjörð BjarmasonApr 9, 2021
  48. Jeff KingApr 9, 2021
  49. Junio C HamanoApr 9, 2021
  50. Ævar Arnfjörð BjarmasonApr 10, 2021
  51. 03/10 userdiff style: declare patterns with consistent styleÆvar Arnfjörð Bjarmason, Mar 24, 2021
  52. 09/10 blame tests: don't rely on t/t4018/ directoryÆvar Arnfjörð Bjarmason, Mar 24, 2021
  53. 07/10 userdiff tests: list builtin drivers via test-toolÆvar Arnfjörð Bjarmason, Mar 24, 2021
  54. 10/10 blame tests: simplify userdiff driver testÆvar Arnfjörð Bjarmason, Mar 24, 2021
  55. Johannes SixtMar 24, 2021
  56. Junio C HamanoMar 24, 2021
  57. Jeff KingMar 24, 2021
  58. 0/9 userdiff: refactor + test improvementsÆvar Arnfjörð Bjarmason, Apr 8, 2021
  59. 1/9 userdiff style: re-order drivers in alphabetical orderÆvar Arnfjörð Bjarmason, Apr 8, 2021
  60. 2/9 userdiff style: declare patterns with consistent styleÆvar Arnfjörð Bjarmason, Apr 8, 2021
  61. 3/9 userdiff style: normalize pascal regex declarationÆvar Arnfjörð Bjarmason, Apr 8, 2021
  62. 4/9 userdiff: add and use for_each_userdiff_driver()Ævar Arnfjörð Bjarmason, Apr 8, 2021
  63. Junio C HamanoApr 8, 2021
  64. 6/9 userdiff tests: list builtin drivers via test-toolÆvar Arnfjörð Bjarmason, Apr 8, 2021
  65. 5/9 userdiff tests: explicitly test "default" patternÆvar Arnfjörð Bjarmason, Apr 8, 2021
  66. 7/9 userdiff: remove support for "broken" testsÆvar Arnfjörð Bjarmason, Apr 8, 2021
  67. 9/9 blame tests: simplify userdiff driver testÆvar Arnfjörð Bjarmason, Apr 8, 2021
  68. 8/9 blame tests: don't rely on t/t4018/ directoryÆvar Arnfjörð Bjarmason, Apr 8, 2021
  69. 01/35 userdiff: refactor away the parse_bool() functionÆvar Arnfjörð Bjarmason, Feb 24, 2021
  70. 02/35 userdiff style: re-order drivers in alphabetical orderÆvar Arnfjörð Bjarmason, Feb 24, 2021
  71. 03/35 userdiff style: declare patterns with consistent styleÆvar Arnfjörð Bjarmason, Feb 24, 2021
  72. 04/35 userdiff style: normalize pascal regex declarationÆvar Arnfjörð Bjarmason, Feb 24, 2021
  73. 05/35 userdiff: add and use for_each_userdiff_driver()Ævar Arnfjörð Bjarmason, Feb 24, 2021
  74. 06/35 userdiff tests: explicitly test "default" patternÆvar Arnfjörð Bjarmason, Feb 24, 2021
  75. 07/35 userdiff tests: list builtin drivers via test-toolÆvar Arnfjörð Bjarmason, Feb 24, 2021
  76. 08/35 userdiff: remove support for "broken" testsÆvar Arnfjörð Bjarmason, Feb 24, 2021
  77. 09/35 blame tests: don't rely on t/t4018/ directoryÆvar Arnfjörð Bjarmason, Feb 24, 2021
  78. 10/35 blame tests: simplify userdiff driver testÆvar Arnfjörð Bjarmason, Feb 24, 2021
  79. 12/35 userdiff tests: change setup loop to individual test setupÆvar Arnfjörð Bjarmason, Feb 24, 2021
  80. Junio C HamanoFeb 25, 2021
  81. Johannes SixtFeb 25, 2021
  82. Junio C HamanoFeb 25, 2021
  83. 15/35 userdiff tests: add a test with multiple tests in a LANG fileÆvar Arnfjörð Bjarmason, Feb 24, 2021
  84. 11/35 userdiff tests: match full hunk headersÆvar Arnfjörð Bjarmason, Feb 24, 2021
  85. Junio C HamanoFeb 25, 2021
  86. 16/35 userdiff tests: do config teardown in test_diff_funcname()Ævar Arnfjörð Bjarmason, Feb 24, 2021
  87. 19/35 userdiff tests: do not do compile tests on "custom" patternÆvar Arnfjörð Bjarmason, Feb 24, 2021
  88. 21/35 userdiff tests + docs: document & test "diff.<driver>.x?funcname"Ævar Arnfjörð Bjarmason, Feb 24, 2021
  89. 25/35 gitattributes doc: document multi-line userdiff patternsÆvar Arnfjörð Bjarmason, Feb 24, 2021
  90. 23/35 userdiff tests: move perl tests to perl.shÆvar Arnfjörð Bjarmason, Feb 24, 2021
  91. 27/35 userdiff tests: remove "funcname" from custom3 testÆvar Arnfjörð Bjarmason, Feb 24, 2021
  92. 13/35 userdiff tests: factor out test_diff_funcname() logicÆvar Arnfjörð Bjarmason, Feb 24, 2021
  93. Junio C HamanoFeb 25, 2021
  94. 14/35 userdiff tests: add alternative hunk header test infrastructureÆvar Arnfjörð Bjarmason, Feb 24, 2021
  95. Johannes SixtFeb 28, 2021
  96. 29/35 userdiff tests: test for a bug in 1dbf0c0ad6cÆvar Arnfjörð Bjarmason, Feb 24, 2021
  97. 17/35 userdiff tests: move custom patterns into one test fileÆvar Arnfjörð Bjarmason, Feb 24, 2021
  98. 18/35 userdiff tests: remove hack for "RIGHT" tokenÆvar Arnfjörð Bjarmason, Feb 24, 2021
  99. 22/35 gitattributes doc: reword discussion of built-in userdiff patternsÆvar Arnfjörð Bjarmason, Feb 24, 2021
  100. 20/35 userdiff tests: assert that new built-in drivers have testsÆvar Arnfjörð Bjarmason, Feb 24, 2021
  101. Johannes SixtFeb 28, 2021
  102. Ævar Arnfjörð BjarmasonFeb 28, 2021
  103. 26/35 userdiff tests: switch to -U0 by defaultÆvar Arnfjörð Bjarmason, Feb 24, 2021
  104. 24/35 userdiff tests: move away from "RIGHT" in perl.shÆvar Arnfjörð Bjarmason, Feb 24, 2021
  105. 28/35 userdiff tests: assert empty hunk header context on -U<large>Ævar Arnfjörð Bjarmason, Feb 24, 2021
  106. 31/35 userdiff golang: don't over-match intented constructsÆvar Arnfjörð Bjarmason, Feb 24, 2021
  107. Johannes SixtFeb 26, 2021
  108. 33/35 userdiff golang: match multi-line "const" and "import"Ævar Arnfjörð Bjarmason, Feb 24, 2021
  109. 34/35 userdiff tests: add basic test for adaÆvar Arnfjörð Bjarmason, Feb 24, 2021
  110. Johannes SixtFeb 27, 2021
  111. 32/35 userdiff golang: add a rule to match "package"Ævar Arnfjörð Bjarmason, Feb 24, 2021
  112. Johannes SixtFeb 26, 2021
  113. 35/35 userdiff tests: add basic test for rubyÆvar Arnfjörð Bjarmason, Feb 24, 2021
  114. Johannes SixtFeb 27, 2021
  115. 30/35 userdiff golang: simplify and correct matching regexÆvar Arnfjörð Bjarmason, Feb 24, 2021
  116. 11/27 blame tests: simplify userdiff driver testÆvar Arnfjörð Bjarmason, Feb 15, 2021
  117. Johannes SixtFeb 15, 2021
  118. Ævar Arnfjörð BjarmasonFeb 17, 2021
  119. Junio C HamanoFeb 17, 2021
  120. Johannes SixtFeb 17, 2021
  121. 10/27 blame tests: don't rely on t/t4018/ directoryÆvar Arnfjörð Bjarmason, Feb 15, 2021
  122. Junio C HamanoFeb 16, 2021
  123. 07/27 userdiff tests: list builtin drivers via test-toolÆvar Arnfjörð Bjarmason, Feb 15, 2021
  124. 04/27 userdiff style: normalize pascal regex declarationÆvar Arnfjörð Bjarmason, Feb 15, 2021
  125. 05/27 userdiff: add and use for_each_userdiff_driver()Ævar Arnfjörð Bjarmason, Feb 15, 2021
  126. 03/27 userdiff style: declare patterns with consistent styleÆvar Arnfjörð Bjarmason, Feb 15, 2021
  127. 13/27 userdiff tests: do config teardown in test_diff_funcname()Ævar Arnfjörð Bjarmason, Feb 15, 2021
  128. 09/27 userdiff tests: match full hunk headersÆvar Arnfjörð Bjarmason, Feb 15, 2021
  129. Johannes SixtFeb 15, 2021
  130. Ævar Arnfjörð BjarmasonFeb 15, 2021
  131. Junio C HamanoFeb 16, 2021
  132. Junio C HamanoFeb 17, 2021
  133. Ævar Arnfjörð BjarmasonFeb 17, 2021
  134. Johannes SixtFeb 16, 2021
  135. Ævar Arnfjörð BjarmasonFeb 17, 2021
  136. Junio C HamanoFeb 17, 2021
  137. Ævar Arnfjörð BjarmasonFeb 23, 2021
  138. Johannes SixtFeb 23, 2021
  139. Ævar Arnfjörð BjarmasonFeb 24, 2021
  140. Johannes SixtFeb 24, 2021
  141. 08/27 userdiff: remove support for "broken" testsÆvar Arnfjörð Bjarmason, Feb 15, 2021
  142. 06/27 userdiff tests: explicitly test "default" patternÆvar Arnfjörð Bjarmason, Feb 15, 2021
  143. 14/27 userdiff tests: move custom patterns into one test fileÆvar Arnfjörð Bjarmason, Feb 15, 2021
  144. 25/27 userdiff: match "package" in diff=golangÆvar Arnfjörð Bjarmason, Feb 15, 2021
  145. 24/27 userdiff tests: assert empty hunk header context on -U<large>Ævar Arnfjörð Bjarmason, Feb 15, 2021
  146. 23/27 userdiff tests: test hunk header selection with -U0Ævar Arnfjörð Bjarmason, Feb 15, 2021
  147. Johannes SixtFeb 15, 2021
  148. 26/27 userdiff tests: add basic test for adaÆvar Arnfjörð Bjarmason, Feb 15, 2021
  149. 27/27 userdiff tests: add basic test for rubyÆvar Arnfjörð Bjarmason, Feb 15, 2021
  150. 18/27 gitattributes doc: reword discussion of built-in userdiff patternsÆvar Arnfjörð Bjarmason, Feb 15, 2021
  151. Junio C HamanoFeb 16, 2021
  152. 16/27 userdiff tests: do not do compile tests on "custom" patternÆvar Arnfjörð Bjarmason, Feb 15, 2021
  153. 20/27 userdiff tests: remove "funcname" from custom3 testÆvar Arnfjörð Bjarmason, Feb 15, 2021
  154. 12/27 userdiff tests: rewrite hunk header test infrastructureÆvar Arnfjörð Bjarmason, Feb 15, 2021
  155. Johannes SixtFeb 15, 2021
  156. Ævar Arnfjörð BjarmasonFeb 15, 2021
  157. Johannes SixtFeb 15, 2021
  158. Junio C HamanoFeb 16, 2021
  159. 19/27 gitattributes doc: document multi-line userdiff patternsÆvar Arnfjörð Bjarmason, Feb 15, 2021
  160. Johannes SixtFeb 15, 2021
  161. Ævar Arnfjörð BjarmasonFeb 15, 2021
  162. Junio C HamanoFeb 17, 2021
  163. 15/27 userdiff tests: remove hack for "RIGHT" tokenÆvar Arnfjörð Bjarmason, Feb 15, 2021
  164. 17/27 userdiff tests + docs: document & test "diff.<driver>.x?funcname"Ævar Arnfjörð Bjarmason, Feb 15, 2021
  165. 21/27 userdiff tests: factor out test_diff_funcname() logicÆvar Arnfjörð Bjarmason, Feb 15, 2021
  166. 22/27 userdiff tests: test hunk headers on accumulated filesÆvar Arnfjörð Bjarmason, Feb 15, 2021
  167. Johannes SixtFeb 15, 2021
  168. 04/20 userdiff tests: explicitly test "default" patternÆvar Arnfjörð Bjarmason, Feb 15, 2021
  169. 05/20 userdiff tests: list builtin drivers via test-toolÆvar Arnfjörð Bjarmason, Feb 15, 2021
  170. Eric SunshineFeb 15, 2021
  171. 06/20 userdiff: remove support for "broken" testsÆvar Arnfjörð Bjarmason, Feb 15, 2021
  172. 09/20 blame tests: don't rely on t/t4018/ directoryÆvar Arnfjörð Bjarmason, Feb 15, 2021
  173. 10/20 userdiff tests: move custom patterns into one test fileÆvar Arnfjörð Bjarmason, Feb 15, 2021
  174. 07/20 userdiff tests: match full hunk headersÆvar Arnfjörð Bjarmason, Feb 15, 2021
  175. Eric SunshineFeb 15, 2021
  176. 11/20 userdiff tests: remove hack for "RIGHT" tokenÆvar Arnfjörð Bjarmason, Feb 15, 2021
  177. 08/20 userdiff tests: rewrite hunk header test infrastructureÆvar Arnfjörð Bjarmason, Feb 15, 2021
  178. 12/20 userdiff: match "package" in diff=golangÆvar Arnfjörð Bjarmason, Feb 15, 2021
  179. 13/20 userdiff tests + docs: document & test "diff.<driver>.x?funcname"Ævar Arnfjörð Bjarmason, Feb 15, 2021
  180. Eric SunshineFeb 15, 2021
  181. 14/20 gitattributes doc: reword discussion of built-in userdiff patternsÆvar Arnfjörð Bjarmason, Feb 15, 2021
  182. Eric SunshineFeb 15, 2021
  183. 17/20 userdiff tests: factor out test_diff_funcname() logicÆvar Arnfjörð Bjarmason, Feb 15, 2021
  184. 15/20 gitattributes doc: document multi-line userdiff patternsÆvar Arnfjörð Bjarmason, Feb 15, 2021
  185. Chris TorekFeb 15, 2021
  186. Eric SunshineFeb 15, 2021
  187. 19/20 userdiff tests: test hunk header selection with -U0Ævar Arnfjörð Bjarmason, Feb 15, 2021
  188. 16/20 userdiff tests: remove "funcname" from custom3 testÆvar Arnfjörð Bjarmason, Feb 15, 2021
  189. 18/20 userdiff tests: test hunk headers on accumulated filesÆvar Arnfjörð Bjarmason, Feb 15, 2021
  190. 20/20 userdiff tests: assert empty hunk header context on -U<large>Ævar Arnfjörð Bjarmason, Feb 15, 2021
  191. Protesilaos StavrouFeb 16, 2021
  192. Ævar Arnfjörð BjarmasonFeb 16, 2021

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.