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

Re: [PATCH v2 24/33] diff-merges: handle imply -p on -c/--cc logic for log.c

From
Sergey Organov <sorganov@gmail.com>
Date
Dec 18, 2020, 22:17 UTC
Message-ID
<87k0te7o9s.fsf@osv.gnss.ru>
In-Reply-To
<CABPp-BG-Nv=pzwTO3J0OK20gFVV67_qFL+m-cL7d9xrMvTjH-Q@mail.gmail.com>
Elijah Newren <newren@gmail.com> writes:
Show 106 quoted lines
> On Fri, Dec 18, 2020 at 1:45 PM Sergey Organov <sorganov@gmail.com> wrote:
>>
>> Elijah Newren <newren@gmail.com> writes:
>>
>> > On Fri, Dec 18, 2020 at 6:01 AM Sergey Organov <sorganov@gmail.com> wrote:
>> >>
>> >> Elijah Newren <newren@gmail.com> writes:
>> >>
>> >> > On Wed, Dec 16, 2020 at 10:50 AM Sergey Organov
>> >> > <sorganov@gmail.com> wrote:
>> >> >>
>> >> >> Move logic that handles implying -p on -c/--cc from
>> >> >> log_setup_revisions_tweak() to diff_merges_setup_revs(), where it
>> >> >> belongs.
>> >> >
>> >> > A very minor point, but I'd probably drop the "where it belongs";
>> >> > while I think the new place makes sense for it, it reads to me like
>> >> > you're either relying on a consensus to move it or implying there was
>> >> > a mistake to not put it here previously, neither of which makes sense.
>> >>
>> >> Well, it was meant to be an excuse for not moving it there earlier in
>> >> the patch series indeed. I just overlooked this piece of code that
>> >> logically belongs to the diff-merges module. I think you need to
>> >> consider the state of the sources right before this patch to see the
>> >> point of phrasing it like this.
>> >>
>> >> That said, I'm fine removing this either.
>> >
>> > If it should have been moved there earlier, then you should amend the
>> > relevant previous commit instead of making a new one.  rebase -i is
>> > your friend and should be used, especially with long patch series.
>> > :-)
>>
>> This is to be a separate commit anyway. I can move the commit itself
>> more closer to the beginning, but I don't see how it'd make things
>> any better.
>>
>> By "earlier" above I mostly meant that I should have noticed and moved
>> it in the first issue or the patch series.
>
> Even if keeping the commit as-is, moving it earlier would have one benefit...
>
>> >
>> >> > Much more importantly, this patch doesn't do what you said in
>> >> > discussions on the previous round.  It'd be helpful if the commit
>> >> > message called out that you are just moving the logic for now and that
>> >> > a subsequent patch will tweak the logic to only trigger this for
>> >> > -c/--cc and not for --diff-merges=.* flags.
>> >>
>> >> I believe this patch is useful by itself, even without any future
>> >> improvements (that we actually discussed), if any, so I don't see the
>> >> point in describing what this patch doesn't do.
>> >>
>> >> OTOH, the commit message seems to be clear enough to expect this patch
>> >> to be pure refactoring, without any functional changes, no?
>> >
>> > I'm just pointing out that reading the patch triggers a "wait, you
>> > said you wanted to enable diffs for merges without diffs for regular
>> > commits" reaction and makes reviewers start diving into the code to
>> > check if they missed where that happened.  Sometimes they'll even
>> > respond to the commit asking about it...and then read a later patch
>> > and find the answer.  Perhaps I'm more attuned to this, because I've
>> > done this to reviewers a number of times and they have asked me to add
>> > a note in the earlier commit message to make it easier for other
>> > reviewers to follow and read the series.  You don't need to describe
>> > in full detail the subsequent changes that will come, just highlight
>> > that they are coming to give reviewers an aid.  For example, this
>> > could be as simple as:
>> >
>> > """
>> > Move logic that handles implying -p on -c/--cc from
>> > log_setup_revisions_tweak() to diff_merges_setup_revs().  A
>> > subsequent commit will tweak this logic further.
>> > """
>>
>> I think I see what you mean, but I still don't like this, sorry, as:
>>
>> First, this commit doesn't tweak the logic at all, so "further" doesn't
>> sound right.
>
> Good point, I should have left off "further".
>
>> Second, the purpose of this move is not to have subsequent commits that
>> will tweak this logic further in any particular way. One of the aims of
>> this commit is rather to make it more simple to have /any/ further
>> tweaks to the logic.
>>
>> Third, if the "tweak" you mention is not accepted, I'd need not to only
>> get rid of the tweaking commit, but not to forget to edit the
>> description of this one, that is basically unrelated?
>
> ...so, one advantage of moving this commit earlier in the series is
> that if it appears before the introduction of --diff-merges, then it
> doesn't trigger the "What?  I thought we weren't making the
> diff-merges flags trigger patches for non-merge commits" reaction, and
> thus makes it clearer that the patch is just pure refactoring.
>
>> >
>> > (Note that 'git log --grep=subsequent' in git.git will find you
>> > several examples of where people have done this kind of thing.)
>>
>> Yeah, I agree it's useful when commits are tightly coupled and thus the
>> purpose of single commit is unclear. I just don't think this one is such
>> a case.
>
> I think where it appears in the series makes its purpose unclear.
Fine, I'll move it earlier in the series then.

Thanks, -- Sergey

Previous: Elijah NewrenNext: Sergey Organov
Message 156 of 232 in “git-log: implement new --diff-merge options”
  1. 00/26 git-log: implement new --diff-merge optionsSergey Organov, Nov 1, 2020
  2. 02/26 revision: factor out setup of diff-merge related settingsSergey Organov, Nov 1, 2020
  3. 03/26 revision: factor out initialization of diff-merge related settingsSergey Organov, Nov 1, 2020
  4. 01/26 revision: factor out parsing of diff-merge related optionsSergey Organov, Nov 1, 2020
  5. 05/26 revision: move diff merges functions to its own diff-merges.cSergey Organov, Nov 1, 2020
  6. 04/26 revision: provide implementation for diff merges tweaksSergey Organov, Nov 1, 2020
  7. 06/26 diff-merges: rename all functions to have common prefixSergey Organov, Nov 1, 2020
  8. 08/26 diff-merges: rename diff_merges_default_to_enable() to match semanticsSergey Organov, Nov 1, 2020
  9. 10/26 diff-merges: new function diff_merges_suppress()Sergey Organov, Nov 1, 2020
  10. Elijah NewrenDec 3, 2020
  11. Sergey OrganovDec 3, 2020
  12. Elijah NewrenDec 3, 2020
  13. Sergey OrganovDec 4, 2020
  14. 07/26 diff-merges: move checks for first_parent_only out of the moduleSergey Organov, Nov 1, 2020
  15. 13/26 diff-merges: revise revs->diff flag handlingSergey Organov, Nov 1, 2020
  16. 12/26 diff-merges: introduce revs->first_parent_merges flagSergey Organov, Nov 1, 2020
  17. 11/26 diff-merges: new function diff_merges_set_dense_combined_if_unset()Sergey Organov, Nov 1, 2020
  18. 18/26 diff-merges: group diff-merge flags next to each other inside 'rev_info'Sergey Organov, Nov 1, 2020
  19. 20/26 diff-merges: refactor opt settings into separate functionsSergey Organov, Nov 1, 2020
  20. 21/26 diff-merges: make -m/-c/--cc explicitly mutually exclusiveSergey Organov, Nov 1, 2020
  21. 19/26 diff-merges: get rid of now empty diff_merges_init_revs()Sergey Organov, Nov 1, 2020
  22. Philip OakleyNov 2, 2020
  23. 22/26 diff-merges: implement new values for --diff-mergesSergey Organov, Nov 1, 2020
  24. 09/26 diff-merges: re-arrange functions to match the order they are called inSergey Organov, Nov 1, 2020
  25. 23/26 t4013: add test for --diff-merges=first-parentSergey Organov, Nov 1, 2020
  26. 25/26 doc/diff-generate-patch: mention new --diff-merges optionSergey Organov, Nov 1, 2020
  27. 24/26 doc/git-log: describe new --diff-merges optionsSergey Organov, Nov 1, 2020
  28. 17/26 diff-merges: split 'ignore_merges' fieldSergey Organov, Nov 1, 2020
  29. Philip OakleyNov 2, 2020
  30. Sergey OrganovNov 2, 2020
  31. 16/26 diff-merges: fix -m to properly override -c/--ccSergey Organov, Nov 1, 2020
  32. 26/26 doc/rev-list-options: document --first-parent implies --diff-merges=first-parentSergey Organov, Nov 1, 2020
  33. 15/26 t4013: add tests for -m failing to override -c/--ccSergey Organov, Nov 1, 2020
  34. 14/26 t4013: support test_expect_failure through ':failure' magicSergey Organov, Nov 1, 2020
  35. 00/27 git-log: implement new --diff-merge optionsSergey Organov, Nov 8, 2020
  36. 01/27 revision: factor out parsing of diff-merge related optionsSergey Organov, Nov 8, 2020
  37. Junio C HamanoDec 3, 2020
  38. Sergey OrganovDec 3, 2020
  39. Junio C HamanoDec 4, 2020
  40. Sergey OrganovDec 4, 2020
  41. 02/27 revision: factor out setup of diff-merge related settingsSergey Organov, Nov 8, 2020
  42. Junio C HamanoDec 3, 2020
  43. 03/27 revision: factor out initialization of diff-merge related settingsSergey Organov, Nov 8, 2020
  44. Junio C HamanoDec 3, 2020
  45. Sergey OrganovDec 3, 2020
  46. 05/27 revision: move diff merges functions to its own diff-merges.cSergey Organov, Nov 8, 2020
  47. Junio C HamanoDec 3, 2020
  48. Sergey OrganovDec 3, 2020
  49. 04/27 revision: provide implementation for diff merges tweaksSergey Organov, Nov 8, 2020
  50. Junio C HamanoDec 3, 2020
  51. Junio C HamanoDec 3, 2020
  52. Sergey OrganovDec 3, 2020
  53. Sergey OrganovDec 3, 2020
  54. 07/27 diff-merges: move checks for first_parent_only out of the moduleSergey Organov, Nov 8, 2020
  55. Junio C HamanoDec 3, 2020
  56. Sergey OrganovDec 3, 2020
  57. 09/27 diff-merges: re-arrange functions to match the order they are called inSergey Organov, Nov 8, 2020
  58. Elijah NewrenDec 3, 2020
  59. Sergey OrganovDec 3, 2020
  60. 10/27 diff-merges: new function diff_merges_suppress()Sergey Organov, Nov 8, 2020
  61. 08/27 diff-merges: rename diff_merges_default_to_enable() to match semanticsSergey Organov, Nov 8, 2020
  62. 11/27 diff-merges: new function diff_merges_set_dense_combined_if_unset()Sergey Organov, Nov 8, 2020
  63. 12/27 diff-merges: introduce revs->first_parent_merges flagSergey Organov, Nov 8, 2020
  64. 13/27 diff-merges: revise revs->diff flag handlingSergey Organov, Nov 8, 2020
  65. 19/27 diff-merges: get rid of now empty diff_merges_init_revs()Sergey Organov, Nov 8, 2020
  66. 21/27 diff-merges: make -m/-c/--cc explicitly mutually exclusiveSergey Organov, Nov 8, 2020
  67. 20/27 diff-merges: refactor opt settings into separate functionsSergey Organov, Nov 8, 2020
  68. 23/27 t4013: add test for --diff-merges=first-parentSergey Organov, Nov 8, 2020
  69. 24/27 doc/git-log: describe new --diff-merges optionsSergey Organov, Nov 8, 2020
  70. Elijah NewrenDec 3, 2020
  71. Sergey OrganovDec 3, 2020
  72. Elijah NewrenDec 3, 2020
  73. Sergey OrganovDec 4, 2020
  74. Elijah NewrenDec 4, 2020
  75. Sergey OrganovDec 4, 2020
  76. Elijah NewrenDec 4, 2020
  77. 22/27 diff-merges: implement new values for --diff-mergesSergey Organov, Nov 8, 2020
  78. 26/27 doc/rev-list-options: document --first-parent implies --diff-merges=first-parentSergey Organov, Nov 8, 2020
  79. 27/27 doc/git-show: include --diff-merges descriptionSergey Organov, Nov 8, 2020
  80. Elijah NewrenDec 3, 2020
  81. Sergey OrganovDec 3, 2020
  82. 18/27 diff-merges: group diff-merge flags next to each other inside 'rev_info'Sergey Organov, Nov 8, 2020
  83. 25/27 doc/diff-generate-patch: mention new --diff-merges optionSergey Organov, Nov 8, 2020
  84. 17/27 diff-merges: split 'ignore_merges' fieldSergey Organov, Nov 8, 2020
  85. 14/27 t4013: support test_expect_failure through ':failure' magicSergey Organov, Nov 8, 2020
  86. 06/27 diff-merges: rename all functions to have common prefixSergey Organov, Nov 8, 2020
  87. Junio C HamanoDec 3, 2020
  88. Sergey OrganovDec 3, 2020
  89. 15/27 t4013: add tests for -m failing to override -c/--ccSergey Organov, Nov 8, 2020
  90. 16/27 diff-merges: fix -m to properly override -c/--ccSergey Organov, Nov 8, 2020
  91. Elijah NewrenDec 3, 2020
  92. Sergey OrganovDec 3, 2020
  93. Elijah NewrenDec 3, 2020
  94. Sergey OrganovDec 4, 2020
  95. Elijah NewrenDec 5, 2020
  96. Sergey OrganovDec 5, 2020
  97. Elijah NewrenDec 5, 2020
  98. Sergey OrganovDec 6, 2020
  99. Sergey OrganovDec 8, 2020
  100. Elijah NewrenDec 8, 2020
  101. Sergey OrganovDec 8, 2020
  102. Elijah NewrenDec 8, 2020
  103. Junio C HamanoDec 9, 2020
  104. Elijah NewrenDec 9, 2020
  105. Junio C HamanoDec 9, 2020
  106. Elijah NewrenDec 9, 2020
  107. Junio C HamanoDec 9, 2020
  108. Elijah NewrenDec 9, 2020
  109. Junio C HamanoDec 9, 2020
  110. Junio C HamanoDec 9, 2020
  111. Sergey OrganovDec 9, 2020
  112. Junio C HamanoDec 9, 2020
  113. Sergey OrganovDec 9, 2020
  114. Junio C HamanoDec 10, 2020
  115. Elijah NewrenDec 10, 2020
  116. Sergey OrganovDec 10, 2020
  117. Junio C HamanoDec 10, 2020
  118. Junio C HamanoDec 10, 2020
  119. Sergey OrganovDec 9, 2020
  120. 00/33 git-log: implement new --diff-merge optionsSergey Organov, Dec 16, 2020
  121. 01/33 revision: factor out parsing of diff-merge related optionsSergey Organov, Dec 16, 2020
  122. 02/33 revision: factor out setup of diff-merge related settingsSergey Organov, Dec 16, 2020
  123. 04/33 revision: provide implementation for diff merges tweaksSergey Organov, Dec 16, 2020
  124. 03/33 revision: factor out initialization of diff-merge related settingsSergey Organov, Dec 16, 2020
  125. 05/33 revision: move diff merges functions to its own diff-merges.cSergey Organov, Dec 16, 2020
  126. 06/33 diff-merges: rename all functions to have common prefixSergey Organov, Dec 16, 2020
  127. 08/33 diff-merges: rename diff_merges_default_to_enable() to match semanticsSergey Organov, Dec 16, 2020
  128. 07/33 diff-merges: move checks for first_parent_only out of the moduleSergey Organov, Dec 16, 2020
  129. 10/33 diff-merges: new function diff_merges_suppress()Sergey Organov, Dec 16, 2020
  130. 09/33 diff-merges: re-arrange functions to match the order they are called inSergey Organov, Dec 16, 2020
  131. 11/33 diff-merges: new function diff_merges_set_dense_combined_if_unset()Sergey Organov, Dec 16, 2020
  132. 13/33 diff-merges: revise revs->diff flag handlingSergey Organov, Dec 16, 2020
  133. 12/33 diff-merges: introduce revs->first_parent_merges flagSergey Organov, Dec 16, 2020
  134. 14/33 t4013: support test_expect_failure through ':failure' magicSergey Organov, Dec 16, 2020
  135. 15/33 t4013: add tests for -m failing to override -c/--ccSergey Organov, Dec 16, 2020
  136. 16/33 diff-merges: fix -m to properly override -c/--ccSergey Organov, Dec 16, 2020
  137. 20/33 diff-merges: refactor opt settings into separate functionsSergey Organov, Dec 16, 2020
  138. 19/33 diff-merges: get rid of now empty diff_merges_init_revs()Sergey Organov, Dec 16, 2020
  139. 23/33 diff-merges: fix style of functions definitionsSergey Organov, Dec 16, 2020
  140. Elijah NewrenDec 18, 2020
  141. Sergey OrganovDec 18, 2020
  142. Elijah NewrenDec 18, 2020
  143. Sergey OrganovDec 18, 2020
  144. Elijah NewrenDec 18, 2020
  145. Felipe ContrerasDec 19, 2020
  146. Sergey OrganovDec 19, 2020
  147. Sergey OrganovDec 20, 2020
  148. Felipe ContrerasDec 21, 2020
  149. Junio C HamanoDec 19, 2020
  150. 24/33 diff-merges: handle imply -p on -c/--cc logic for log.cSergey Organov, Dec 16, 2020
  151. Elijah NewrenDec 18, 2020
  152. Sergey OrganovDec 18, 2020
  153. Elijah NewrenDec 18, 2020
  154. Sergey OrganovDec 18, 2020
  155. Elijah NewrenDec 18, 2020
  156. Sergey OrganovDec 18, 2020
  157. 28/33 diff-merges: add '--diff-merges=1' as synonym for 'first-parent'Sergey Organov, Dec 16, 2020
  158. Elijah NewrenDec 18, 2020
  159. Sergey OrganovDec 18, 2020
  160. 27/33 diff-merges: add old mnemonic counterparts to --diff-mergesSergey Organov, Dec 16, 2020
  161. 31/33 doc/rev-list-options: document --first-parent changes merges formatSergey Organov, Dec 16, 2020
  162. 30/33 doc/diff-generate-patch: mention new --diff-merges optionSergey Organov, Dec 16, 2020
  163. 18/33 diff-merges: group diff-merge flags next to each other inside 'rev_info'Sergey Organov, Dec 16, 2020
  164. 17/33 diff-merges: split 'ignore_merges' fieldSergey Organov, Dec 16, 2020
  165. 21/33 diff-merges: make -m/-c/--cc explicitly mutually exclusiveSergey Organov, Dec 16, 2020
  166. 26/33 diff-merges: let new options enable diff without -pSergey Organov, Dec 16, 2020
  167. Elijah NewrenDec 18, 2020
  168. Sergey OrganovDec 18, 2020
  169. Elijah NewrenDec 18, 2020
  170. Sergey OrganovDec 18, 2020
  171. Elijah NewrenDec 18, 2020
  172. Sergey OrganovDec 18, 2020
  173. Sergey OrganovDec 18, 2020
  174. Sergey OrganovDec 19, 2020
  175. Felipe ContrerasDec 19, 2020
  176. Sergey OrganovDec 19, 2020
  177. Sergey OrganovDec 20, 2020
  178. Felipe ContrerasDec 19, 2020
  179. Sergey OrganovDec 19, 2020
  180. 25/33 diff-merges: do not imply -p for new optionsSergey Organov, Dec 16, 2020
  181. 29/33 doc/git-log: describe new --diff-merges optionsSergey Organov, Dec 16, 2020
  182. Elijah NewrenDec 18, 2020
  183. Sergey OrganovDec 18, 2020
  184. Elijah NewrenDec 18, 2020
  185. Sergey OrganovDec 18, 2020
  186. Elijah NewrenDec 18, 2020
  187. 32/33 doc/git-show: include --diff-merges descriptionSergey Organov, Dec 16, 2020
  188. 33/33 t4013: add tests for --diff-merges=first-parentSergey Organov, Dec 16, 2020
  189. 22/33 diff-merges: implement new values for --diff-mergesSergey Organov, Dec 16, 2020
  190. Elijah NewrenDec 18, 2020
  191. Sergey OrganovDec 18, 2020
  192. Elijah NewrenDec 18, 2020
  193. Sergey OrganovDec 18, 2020
  194. Elijah NewrenDec 18, 2020
  195. Sergey OrganovDec 18, 2020
  196. 00/32 git-log: implement new --diff-merge optionsSergey Organov, Dec 21, 2020
  197. 32/32 t4013: add tests for --diff-merges=first-parentSergey Organov, Dec 21, 2020
  198. 09/32 diff-merges: re-arrange functions to match the order they are called inSergey Organov, Dec 21, 2020
  199. 03/32 revision: factor out initialization of diff-merge related settingsSergey Organov, Dec 21, 2020
  200. 11/32 diff-merges: new function diff_merges_set_dense_combined_if_unset()Sergey Organov, Dec 21, 2020
  201. 23/32 diff-merges: implement new values for --diff-mergesSergey Organov, Dec 21, 2020
  202. 22/32 diff-merges: make -m/-c/--cc explicitly mutually exclusiveSergey Organov, Dec 21, 2020
  203. 18/32 diff-merges: split 'ignore_merges' fieldSergey Organov, Dec 21, 2020
  204. 24/32 diff-merges: do not imply -p for new optionsSergey Organov, Dec 21, 2020
  205. 17/32 diff-merges: fix -m to properly override -c/--ccSergey Organov, Dec 21, 2020
  206. 15/32 t4013: support test_expect_failure through ':failure' magicSergey Organov, Dec 21, 2020
  207. 26/32 diff-merges: add old mnemonic counterparts to --diff-mergesSergey Organov, Dec 21, 2020
  208. 19/32 diff-merges: group diff-merge flags next to each other inside 'rev_info'Sergey Organov, Dec 21, 2020
  209. 20/32 diff-merges: get rid of now empty diff_merges_init_revs()Sergey Organov, Dec 21, 2020
  210. 25/32 diff-merges: let new options enable diff without -pSergey Organov, Dec 21, 2020
  211. Felipe ContrerasDec 21, 2020
  212. Sergey OrganovDec 21, 2020
  213. 06/32 diff-merges: rename all functions to have common prefixSergey Organov, Dec 21, 2020
  214. 07/32 diff-merges: move checks for first_parent_only out of the moduleSergey Organov, Dec 21, 2020
  215. 31/32 doc/git-show: include --diff-merges descriptionSergey Organov, Dec 21, 2020
  216. 30/32 doc/rev-list-options: document --first-parent changes merges formatSergey Organov, Dec 21, 2020
  217. 12/32 diff-merges: introduce revs->first_parent_merges flagSergey Organov, Dec 21, 2020
  218. 21/32 diff-merges: refactor opt settings into separate functionsSergey Organov, Dec 21, 2020
  219. 27/32 diff-merges: add '--diff-merges=1' as synonym for 'first-parent'Sergey Organov, Dec 21, 2020
  220. 02/32 revision: factor out setup of diff-merge related settingsSergey Organov, Dec 21, 2020
  221. 05/32 revision: move diff merges functions to its own diff-merges.cSergey Organov, Dec 21, 2020
  222. 08/32 diff-merges: rename diff_merges_default_to_enable() to match semanticsSergey Organov, Dec 21, 2020
  223. 28/32 doc/git-log: describe new --diff-merges optionsSergey Organov, Dec 21, 2020
  224. 29/32 doc/diff-generate-patch: mention new --diff-merges optionSergey Organov, Dec 21, 2020
  225. 01/32 revision: factor out parsing of diff-merge related optionsSergey Organov, Dec 21, 2020
  226. 16/32 t4013: add tests for -m failing to override -c/--ccSergey Organov, Dec 21, 2020
  227. 14/32 diff-merges: revise revs->diff flag handlingSergey Organov, Dec 21, 2020
  228. 04/32 revision: provide implementation for diff merges tweaksSergey Organov, Dec 21, 2020
  229. 10/32 diff-merges: new function diff_merges_suppress()Sergey Organov, Dec 21, 2020
  230. 13/32 diff-merges: handle imply -p on -c/--cc logic for log.cSergey Organov, Dec 21, 2020
  231. Junio C HamanoJan 16, 2021
  232. Sergey OrganovJan 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.