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

Re: [PATCH 11/14] replay: use standard revision ranges

From
Elijah Newren <newren@gmail.com>
Date
Apr 30, 2023, 06:45 UTC
Message-ID
<CABPp-BGRtcBQ_6fkMrTskV9dk71ffycXZ8hEE_RaOrAdza_wLA@mail.gmail.com>
In-Reply-To
<58f7918f-6ca3-2158-7d9e-bfcd8eb24b0d@github.com>
On Mon, Apr 24, 2023 at 8:23 AM Derrick Stolee <derrickstolee@github.com> wrote:
Show 25 quoted lines
>
> On 4/22/2023 9:18 PM, Elijah Newren wrote:
> > On Thu, Apr 20, 2023 at 6:44 AM Derrick Stolee <derrickstolee@github.com> wrote:
> >>
> >> On 4/20/2023 12:53 AM, Elijah Newren wrote:
> >>> On Tue, Apr 18, 2023 at 6:10 AM Derrick Stolee <derrickstolee@github.com> wrote:
>
> >>  3. (Ordering options) Modifications to how those commits are ordered,
> >>     such as --topo-order, --date-order, and --reverse. These seem to
> >>     be overridden by git-replay (although, --reverse probably causes
> >>     some confusion right now).
> >
> > Yep, intentionally overridden.
> >
> > Could you elaborate on what you mean by --reverse causing confusion?
>
> It's very unlikely that a list of patches will successfully apply
> when applied in the reverse order. If we allow the argument, then
> someone will try it thinking they can flip their commits. Then they
> might be surprised when there are a bunch of conflicts on every
> commit.
>
> Basically, I'm not super thrilled about exposing options that are
> unlikely to be valuable to users and instead are more likely to cause
> confusion due to changes that won't successfully apply.

Oh, I got thrown by the "right now" portion of your comment; I couldn't see how time or future changes would affect anything to make it less (or more) confusing for users.

Quick clarification, though: while you correctly point out the type of confusion the user would experience without my overriding, my overriding of rev.reverse (after setup_revisions() returns, not before it is called) precludes that experience. The override means none of the above happens, and they would instead just wonder why their option is being ignored.

[...]
Show 13 quoted lines
> > The rest is all fair, but I'd like to point out that there are a few
> > problems here:
> >
> >   * Tests should generally be passing before submitting upstream, so
> > all the code to implement them needs to be sent too
> >   * Submitted patch series have to be digestible sizes; not everything
> > can be submitted at once
> >   * Christian and Dscho wanted some of what I had implemented despite
> > other parts not being ready
>
> Outside of my first response (using positional arguments, recommended
> before you provided the extra context I was missing) I have not
> suggested implementing something that can't be forward compatible.

True, and maybe I was misunderstanding, but I thought you were trying to make it forward compatible to only slight deviations while ruling out most potential future changes, including ones I was specifically highlighting as minimum eventual requirements. While it was clear that _some_ of the limitations you were trying to impose were only on v1, it sounded like you were also trying to rule out a wide swath of things permanently. That's where things really concerned me, and why I specifically asked which you were trying to do.

To be honest, I'm still unsure what your original intent was.  But it
probably doesn't matter now, as it sounds like you've shifted.  I
_think_ an accurate summary of where we are now at the end of
this thread is:
  * I am predominantly concerned about flexibility/potential for
git-replay in the future (what goes in v1 doesn't matter *if* it
doesn't affect the future, but that's a huge "if").
  * You are predominantly concerned about v1 and only including the
portions of functionality that have associated tests
I think there's enough wiggle room to mostly satisfy both viewpoints.

You helped with my concern by stating that categories (1) and (2) should be fine for git-replay in the future. (It at least handles the forms of potential lock-in that I already know about, though I'm worried there are others.)

I believe we can give you what you want via a tweak to the hack you previously suggested for v1 only: rule out passing any options with a leading dash to setup_revisions(), *and* throw an error if revs->prune_data.nr is nonzero after calling setup_revisions(). But I'd want us to include a comment pointing out that it's a hack, and include in that note that in the future we want to allow all options in categories (1) and (2) to be passed to setup_revisions() (or passed to a suitable refactoring thereof).

[...]
Show 29 quoted lines
> >> so your progress here isn't blocked on refactoring the revisions
> >> API.
> >
> > Is that a positive or a negative?  That question may surprise you, so
> > let me explain.
> >
> > I have a conflict of interest of sorts.  When Christian and Dscho
> > (separately) approached me earlier this year and pointed out that
> > git-replay had the functionality they wanted, I was happy that others
> > liked it, and gave some pointers here and there, but I was _very_
> > worried that upstreaming it would result in something getting
> > backward-incompatibly locked into place that prevents the pieces that
> > are  still in progress from getting implemented.  And I was concerned
> > that my plans to create a tool people could experiment with, and that
> > we could get usability feedback on (as I suggested at the Git
> > contributors summit last year) might be in jeopardy as pieces of its
> > functionality get locked into place before it's even ready for
> > usability testing.  I was silently hoping they'd lose steam on
> > rebasing and cleaning up my patches or choose to just delay until I
> > could get real time to work on it with them.  (Since then, the one
> > person who had ever advocated for my Git work at $DAYJOB, the best
> > manager I had ever worked under, became not-a-manager.  I was
> > blindsided by that in February.  Also, I have been transferred to a
> > different team and am spinning up there.  And so, to my dismay, I'm
> > worried my little sliver of Git time at work may evaporate entirely
> > rather than return to previous healthier levels.)  Anyway, I've been
> > fretting about things getting "locked-in" for a few months.
>
> I'm also upset that you have been disrupted like this.
Thanks.
Show 12 quoted lines
> > They didn't lose steam, as I found out when these patches were
> > submitted.  But, uh, I'm silently torn because I want to help
> > Christian and Dscho get what they want, but having them be blocked on
> > progress would reduce my stress.  A lot.
>
> From my perspective, git-replay's most important use is being able
> to generate rebases without a worktree or an interactive user. For
> now, I don't even care if that includes conflict resolution. That's
> enough of a lift that has enough unknowns that adding a complex CLI
> at this early stage seems like a hasty decision to me.  I'm voicing
> my opinion that we should avoid backwards-compatibility issues by
> implementing only the essentials.

That comment is mostly reasonable, but I'd like to nit-pick the last sentence: while limiting the series further for now is okay, I don't believe that only implementing the essentials is any kind of guarantee against backwards-compatibility issues. More on that below.

> That said, I also want to make sure that you eventually get the
> super-flexible command that you want, but only when the framework
> is ready for that kind of flexibility.
Yaay!!!
Show 8 quoted lines
> > Is there any chance people would be willing to accept a "NO BACKWARD
> > COMPATIBILITY GUARANTEES" disclaimer on this command for a (long?)
> > while, like Victoria suggested at Review club?  That might be an
> > alternate solution that would lower my worries.
>
> I'm not crazy about this idea, especially when it is easy to do
> something simpler and avoid the need for it. But I'm just one voice
> and one opinion.

Sorry I wasn't clear. I wasn't suggesting this as a way of avoiding something simpler; I was suggesting it as an addition to doing something simpler, because it's not clear to me that doing something simpler is sufficient.

Actually, I think it goes a bit further than that. Most of my objections to various forms of simplifying are due to the fact that I think that simplifying greatly increases the risks of accidental backward compatibility issues.

Part of the reason why I feel that way is that simplifying has to go through future rounds of review and people may well respond with, "oh, that'd be easier if you just did <X> instead of <Y>" with an implicit assumption that there's no difference between them if <simplification Z> is being presented as all we need, since <X> and <Y> handle that simplification equally well. It's kind of hard to guess in advance all the forms that <X>, <Y>, and <Z> combined can take, and I also have no idea if I'll have time to respond to upcoming reviews in a timely fashion given current conditions, especially as I'm not the one submitting the patches, so simplifying is a *big* risk in my book. And this clearly isn't just theoretical, as this thread started precisely with a simplification suggestion that would have broken everything. But even more importantly, I didn't start git-replay until I found too many backward compatibility issues in rebase that just couldn't be resolved, and yet I know that when folks review patches they will make suggestions in line with what they are familiar with, likely meaning rebase-like behavior. So, "limiting to the essentials" sounds like "increase the risk of future problems" to me...unless we include a backward-compatibility-explicitly-not-guaranteed-right-now disclaimer from the beginning.

Previous: Derrick StoleeNext: Johannes Schindelin
Message 26 of 208 in “Introduce new `git replay` command”
  1. 00/14 Introduce new `git replay` commandChristian Couder, Apr 7, 2023
  2. 02/14 replay: start using parse_options APIChristian Couder, Apr 7, 2023
  3. 01/14 replay: introduce new builtinChristian Couder, Apr 7, 2023
  4. 03/14 replay: die() instead of failing assert()Christian Couder, Apr 7, 2023
  5. 06/14 replay: add an important FIXME comment about gpg signingChristian Couder, Apr 7, 2023
  6. 04/14 replay: introduce pick_regular_commit()Christian Couder, Apr 7, 2023
  7. 05/14 replay: don't simplify historyChristian Couder, Apr 7, 2023
  8. 08/14 replay: remove HEAD related sanity checkChristian Couder, Apr 7, 2023
  9. 07/14 replay: remove progress and info outputChristian Couder, Apr 7, 2023
  10. 09/14 replay: very coarse worktree updatingChristian Couder, Apr 7, 2023
  11. 12/14 replay: introduce guess_new_base()Christian Couder, Apr 7, 2023
  12. 10/14 replay: make it a minimal server side commandChristian Couder, Apr 7, 2023
  13. 14/14 replay: stop assuming replayed branches do not divergeChristian Couder, Apr 7, 2023
  14. 11/14 replay: use standard revision rangesChristian Couder, Apr 7, 2023
  15. Derrick StoleeApr 14, 2023
  16. Derrick StoleeApr 14, 2023
  17. Elijah NewrenApr 15, 2023
  18. Elijah NewrenApr 16, 2023
  19. Derrick StoleeApr 17, 2023
  20. Elijah NewrenApr 18, 2023
  21. Derrick StoleeApr 18, 2023
  22. Elijah NewrenApr 20, 2023
  23. Derrick StoleeApr 20, 2023
  24. Elijah NewrenApr 23, 2023
  25. Derrick StoleeApr 24, 2023
  26. Elijah NewrenApr 30, 2023
  27. Johannes SchindelinSep 3, 2023
  28. Christian CouderSep 7, 2023
  29. Johannes SchindelinSep 7, 2023
  30. Junio C HamanoApr 17, 2023
  31. Elijah NewrenApr 18, 2023
  32. Elijah NewrenApr 18, 2023
  33. Elijah NewrenApr 15, 2023
  34. 13/14 replay: add different modesChristian Couder, Apr 7, 2023
  35. Phillip WoodApr 14, 2023
  36. Elijah NewrenApr 15, 2023
  37. Felipe ContrerasApr 14, 2023
  38. Elijah NewrenApr 15, 2023
  39. 00/15 Introduce new `git replay` commandChristian Couder, May 9, 2023
  40. 01/15 t6429: remove switching aspects of fast-rebaseChristian Couder, May 9, 2023
  41. 02/15 replay: introduce new builtinChristian Couder, May 9, 2023
  42. 04/15 replay: die() instead of failing assert()Christian Couder, May 9, 2023
  43. 03/15 replay: start using parse_options APIChristian Couder, May 9, 2023
  44. 05/15 replay: introduce pick_regular_commit()Christian Couder, May 9, 2023
  45. 06/15 replay: don't simplify historyChristian Couder, May 9, 2023
  46. 07/15 replay: add an important FIXME comment about gpg signingChristian Couder, May 9, 2023
  47. 08/15 replay: remove progress and info outputChristian Couder, May 9, 2023
  48. 09/15 replay: remove HEAD related sanity checkChristian Couder, May 9, 2023
  49. 10/15 replay: make it a minimal server side commandChristian Couder, May 9, 2023
  50. 11/15 replay: use standard revision rangesChristian Couder, May 9, 2023
  51. 12/15 replay: disallow revision specific options and pathspecsChristian Couder, May 9, 2023
  52. Elijah NewrenMay 16, 2023
  53. 13/15 replay: add --advance or 'cherry-pick' modeChristian Couder, May 9, 2023
  54. 14/15 replay: add --contained to rebase contained branchesChristian Couder, May 9, 2023
  55. Elijah NewrenMay 16, 2023
  56. 15/15 replay: stop assuming replayed branches do not divergeChristian Couder, May 9, 2023
  57. Elijah NewrenMay 16, 2023
  58. Junio C HamanoMay 9, 2023
  59. Christian CouderMay 10, 2023
  60. Elijah NewrenMay 16, 2023
  61. 00/15 Introduce new `git replay` commandChristian Couder, Jun 2, 2023
  62. 01/15 t6429: remove switching aspects of fast-rebaseChristian Couder, Jun 2, 2023
  63. 02/15 replay: introduce new builtinChristian Couder, Jun 2, 2023
  64. 04/15 replay: die() instead of failing assert()Christian Couder, Jun 2, 2023
  65. 05/15 replay: introduce pick_regular_commit()Christian Couder, Jun 2, 2023
  66. 03/15 replay: start using parse_options APIChristian Couder, Jun 2, 2023
  67. 06/15 replay: don't simplify historyChristian Couder, Jun 2, 2023
  68. 07/15 replay: add an important FIXME comment about gpg signingChristian Couder, Jun 2, 2023
  69. 08/15 replay: remove progress and info outputChristian Couder, Jun 2, 2023
  70. 09/15 replay: remove HEAD related sanity checkChristian Couder, Jun 2, 2023
  71. 10/15 replay: make it a minimal server side commandChristian Couder, Jun 2, 2023
  72. Toon ClaesJun 22, 2023
  73. Christian CouderSep 7, 2023
  74. 11/15 replay: use standard revision rangesChristian Couder, Jun 2, 2023
  75. Toon ClaesJun 22, 2023
  76. Christian CouderSep 7, 2023
  77. Dragan SimicSep 7, 2023
  78. Christian CouderOct 10, 2023
  79. Dragan SimicOct 10, 2023
  80. 12/15 replay: disallow revision specific options and pathspecsChristian Couder, Jun 2, 2023
  81. Junio C HamanoJul 25, 2023
  82. Christian CouderSep 7, 2023
  83. 13/15 replay: add --advance or 'cherry-pick' modeChristian Couder, Jun 2, 2023
  84. Toon ClaesJun 22, 2023
  85. Christian CouderSep 7, 2023
  86. Junio C HamanoJul 25, 2023
  87. Christian CouderSep 7, 2023
  88. 15/15 replay: stop assuming replayed branches do not divergeChristian Couder, Jun 2, 2023
  89. 14/15 replay: add --contained to rebase contained branchesChristian Couder, Jun 2, 2023
  90. Toon ClaesJun 22, 2023
  91. Christian CouderSep 7, 2023
  92. Junio C HamanoJun 3, 2023
  93. Christian CouderJun 5, 2023
  94. 00/15 Introduce new `git replay` commandChristian Couder, Sep 7, 2023
  95. 06/15 replay: don't simplify historyChristian Couder, Sep 7, 2023
  96. Johannes SchindelinSep 7, 2023
  97. Christian CouderOct 10, 2023
  98. 07/15 replay: add an important FIXME comment about gpg signingChristian Couder, Sep 7, 2023
  99. 04/15 replay: die() instead of failing assert()Christian Couder, Sep 7, 2023
  100. 10/15 replay: make it a minimal server side commandChristian Couder, Sep 7, 2023
  101. 14/15 replay: add --contained to rebase contained branchesChristian Couder, Sep 7, 2023
  102. 01/15 t6429: remove switching aspects of fast-rebaseChristian Couder, Sep 7, 2023
  103. 12/15 replay: disallow revision specific options and pathspecsChristian Couder, Sep 7, 2023
  104. Johannes SchindelinSep 7, 2023
  105. Christian CouderOct 10, 2023
  106. 13/15 replay: add --advance or 'cherry-pick' modeChristian Couder, Sep 7, 2023
  107. 11/15 replay: use standard revision rangesChristian Couder, Sep 7, 2023
  108. Johannes SchindelinSep 7, 2023
  109. Christian CouderOct 10, 2023
  110. Linus ArverSep 8, 2023
  111. Linus ArverSep 10, 2023
  112. Christian CouderOct 10, 2023
  113. Christian CouderOct 10, 2023
  114. Linus ArverOct 19, 2023
  115. 08/15 replay: remove progress and info outputChristian Couder, Sep 7, 2023
  116. 03/15 replay: start using parse_options APIChristian Couder, Sep 7, 2023
  117. 09/15 replay: remove HEAD related sanity checkChristian Couder, Sep 7, 2023
  118. Johannes SchindelinSep 7, 2023
  119. Christian CouderOct 10, 2023
  120. 05/15 replay: introduce pick_regular_commit()Christian Couder, Sep 7, 2023
  121. 02/15 replay: introduce new builtinChristian Couder, Sep 7, 2023
  122. Johannes SchindelinSep 7, 2023
  123. Christian CouderOct 10, 2023
  124. 15/15 replay: stop assuming replayed branches do not divergeChristian Couder, Sep 7, 2023
  125. 00/14 Introduce new `git replay` commandChristian Couder, Oct 10, 2023
  126. 01/14 t6429: remove switching aspects of fast-rebaseChristian Couder, Oct 10, 2023
  127. 03/14 replay: start using parse_options APIChristian Couder, Oct 10, 2023
  128. 02/14 replay: introduce new builtinChristian Couder, Oct 10, 2023
  129. 04/14 replay: die() instead of failing assert()Christian Couder, Oct 10, 2023
  130. 05/14 replay: introduce pick_regular_commit()Christian Couder, Oct 10, 2023
  131. 07/14 replay: add an important FIXME comment about gpg signingChristian Couder, Oct 10, 2023
  132. 06/14 replay: change rev walking optionsChristian Couder, Oct 10, 2023
  133. 10/14 replay: make it a minimal server side commandChristian Couder, Oct 10, 2023
  134. 08/14 replay: remove progress and info outputChristian Couder, Oct 10, 2023
  135. 09/14 replay: remove HEAD related sanity checkChristian Couder, Oct 10, 2023
  136. 11/14 replay: use standard revision rangesChristian Couder, Oct 10, 2023
  137. Linus ArverOct 19, 2023
  138. 12/14 replay: add --advance or 'cherry-pick' modeChristian Couder, Oct 10, 2023
  139. 13/14 replay: add --contained to rebase contained branchesChristian Couder, Oct 10, 2023
  140. 14/14 replay: stop assuming replayed branches do not divergeChristian Couder, Oct 10, 2023
  141. Johannes SchindelinOct 26, 2023
  142. Elijah NewrenOct 29, 2023
  143. Christian CouderNov 2, 2023
  144. Johannes SchindelinNov 8, 2023
  145. Christian CouderNov 2, 2023
  146. Johannes SchindelinNov 8, 2023
  147. Elijah NewrenOct 29, 2023
  148. Johannes SchindelinOct 29, 2023
  149. Elijah NewrenOct 30, 2023
  150. Christian CouderNov 2, 2023
  151. Christian CouderNov 2, 2023
  152. 00/14 Introduce new `git replay` commandChristian Couder, Nov 2, 2023
  153. 01/14 t6429: remove switching aspects of fast-rebaseChristian Couder, Nov 2, 2023
  154. 03/14 replay: start using parse_options APIChristian Couder, Nov 2, 2023
  155. 04/14 replay: die() instead of failing assert()Christian Couder, Nov 2, 2023
  156. 05/14 replay: introduce pick_regular_commit()Christian Couder, Nov 2, 2023
  157. 02/14 replay: introduce new builtinChristian Couder, Nov 2, 2023
  158. 07/14 replay: add an important FIXME comment about gpg signingChristian Couder, Nov 2, 2023
  159. 06/14 replay: change rev walking optionsChristian Couder, Nov 2, 2023
  160. 08/14 replay: remove progress and info outputChristian Couder, Nov 2, 2023
  161. 09/14 replay: remove HEAD related sanity checkChristian Couder, Nov 2, 2023
  162. 10/14 replay: make it a minimal server side commandChristian Couder, Nov 2, 2023
  163. 11/14 replay: use standard revision rangesChristian Couder, Nov 2, 2023
  164. 12/14 replay: add --advance or 'cherry-pick' modeChristian Couder, Nov 2, 2023
  165. 13/14 replay: add --contained to rebase contained branchesChristian Couder, Nov 2, 2023
  166. 14/14 replay: stop assuming replayed branches do not divergeChristian Couder, Nov 2, 2023
  167. Elijah NewrenNov 7, 2023
  168. Christian CouderNov 7, 2023
  169. Christian CouderNov 15, 2023
  170. Johannes SchindelinNov 8, 2023
  171. Johannes SchindelinNov 8, 2023
  172. Christian CouderNov 15, 2023
  173. Johannes SchindelinNov 16, 2023
  174. Christian CouderNov 16, 2023
  175. 00/14 Introduce new `git replay` commandChristian Couder, Nov 15, 2023
  176. 01/14 t6429: remove switching aspects of fast-rebaseChristian Couder, Nov 15, 2023
  177. 02/14 replay: introduce new builtinChristian Couder, Nov 15, 2023
  178. 03/14 replay: start using parse_options APIChristian Couder, Nov 15, 2023
  179. 04/14 replay: die() instead of failing assert()Christian Couder, Nov 15, 2023
  180. 05/14 replay: introduce pick_regular_commit()Christian Couder, Nov 15, 2023
  181. 06/14 replay: change rev walking optionsChristian Couder, Nov 15, 2023
  182. 07/14 replay: add an important FIXME comment about gpg signingChristian Couder, Nov 15, 2023
  183. 08/14 replay: remove progress and info outputChristian Couder, Nov 15, 2023
  184. 09/14 replay: remove HEAD related sanity checkChristian Couder, Nov 15, 2023
  185. 10/14 replay: make it a minimal server side commandChristian Couder, Nov 15, 2023
  186. 11/14 replay: use standard revision rangesChristian Couder, Nov 15, 2023
  187. 12/14 replay: add --advance or 'cherry-pick' modeChristian Couder, Nov 15, 2023
  188. 13/14 replay: add --contained to rebase contained branchesChristian Couder, Nov 15, 2023
  189. 14/14 replay: stop assuming replayed branches do not divergeChristian Couder, Nov 15, 2023
  190. Johannes SchindelinNov 16, 2023
  191. Elijah NewrenNov 23, 2023
  192. Junio C HamanoNov 24, 2023
  193. 00/14 Introduce new `git replay` commandChristian Couder, Nov 24, 2023
  194. 01/14 t6429: remove switching aspects of fast-rebaseChristian Couder, Nov 24, 2023
  195. 02/14 replay: introduce new builtinChristian Couder, Nov 24, 2023
  196. 03/14 replay: start using parse_options APIChristian Couder, Nov 24, 2023
  197. 04/14 replay: die() instead of failing assert()Christian Couder, Nov 24, 2023
  198. 05/14 replay: introduce pick_regular_commit()Christian Couder, Nov 24, 2023
  199. 06/14 replay: change rev walking optionsChristian Couder, Nov 24, 2023
  200. 07/14 replay: add an important FIXME comment about gpg signingChristian Couder, Nov 24, 2023
  201. 08/14 replay: remove progress and info outputChristian Couder, Nov 24, 2023
  202. 09/14 replay: remove HEAD related sanity checkChristian Couder, Nov 24, 2023
  203. 10/14 replay: make it a minimal server side commandChristian Couder, Nov 24, 2023
  204. 11/14 replay: use standard revision rangesChristian Couder, Nov 24, 2023
  205. 12/14 replay: add --advance or 'cherry-pick' modeChristian Couder, Nov 24, 2023
  206. 13/14 replay: add --contained to rebase contained branchesChristian Couder, Nov 24, 2023
  207. 14/14 replay: stop assuming replayed branches do not divergeChristian Couder, Nov 24, 2023
  208. Johannes SchindelinNov 25, 2023

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.