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

Re: Rebase/cherry-picking idea

From
Junio C Hamano <gitster@pobox.com>
Date
Nov 28, 2007, 09:47 UTC
Message-ID
<7v1waa7lcv.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<50645A3B-C5F0-4A99-A2B8-AD9251024244@wincent.com>
Wincent Colaiuta <win@wincent.com> writes:
Show 6 quoted lines
> The problem in this case was that my patch didn't receive any
> meaningful feedback (ie. suggestions for improvement), only a lot of
> bikeshed stuff about whether the environment variable should have an
> underscore prefix or not, whether or not I should use "export FOO=..."
> or not etc. So I didn't know what was necessary in order to get it
> accepted.
I do not think that is the case.

I think _GIT_FOO vs GIT_FOO is an important detail, not at all a bikeshed color, to make things consistent. "export VAR=VAL" also is a valid concern (you said in a separate message you only know about bash, and I later asked people if they use shells that get affected with it but we happily run otherwise. I personally do not think the latter is a problem, but since somebody already raised it as a potential issue, it gave us a good chance to hear from people on minority platforms, if only to build confidence in us to use that POSIX form.

Maybe it is just me, but I think my suggestion to replace not just "git commit" part but also "git add" part is also an important design issue.

In any case, after a discussion, sending out a readily applyable patch would help to make sure we reached a reasonable consensus; it makes it easier for other people to try out your proposed draft of the consensus without waiting for me or anybody else and give positive feedback.

The difference between the variant I posted and your revised one I see are:

 * As discussed, we have precedence like GITHEAD_* and GIT_REFLOG_ACTION
   that are used purely for inter-tool communication without the leading
   underscore, so I followed them for consistency.
 * The part of the message that is overridable is made wider; that way,
   we can later choose to have "git rebase --continue" do the final "git
   add -u" step, just like we made "git rebase --skip" to run "git reset
   --hard", without changing revert/cherry-pick,as I explained in the
   comment to my patch.
 * I made the help-message creation into a separate function.  This is
   just a minor detail, but I think it is good for readability.
 * I am setting and exporting the help environment near the beginning of
   rebase--interactive just once; again I think this is more readable.
But other than that, the basic idea is the same and is all yours.

If these details (I do not think the overridability is a minor detail, though) look like bikeshedding to you, that is somewhat sad. You seem to be very capable of producing usable code, but these details (consistency and flexibility) matter for longer term stability, and I would really want to see capable people pay attention to such details, especially I sometimes fail to do so myself.

Previous: Wincent ColaiutaNext: Wincent Colaiuta
Message 12 of 43 in “Rebase/cherry-picking idea”
  1. Wincent ColaiutaNov 26, 2007
  2. Benoit SigoureNov 26, 2007
  3. Wincent ColaiutaNov 26, 2007
  4. Wincent ColaiutaNov 26, 2007
  5. Benoit SigoureNov 26, 2007
  6. Johannes SixtNov 26, 2007
  7. Wincent ColaiutaNov 26, 2007
  8. Johannes SchindelinNov 26, 2007
  9. Wincent ColaiutaNov 26, 2007
  10. Junio C HamanoNov 28, 2007
  11. Wincent ColaiutaNov 28, 2007
  12. Junio C HamanoNov 28, 2007
  13. Wincent ColaiutaNov 28, 2007
  14. Replace instances of export VAR=VAL with VAR=VAL; export VARJohannes Schindelin, Nov 28, 2007
  15. David KastrupNov 28, 2007
  16. Nguyen Thai Ngoc DuyNov 28, 2007
  17. David KastrupNov 28, 2007
  18. Nguyen Thai Ngoc DuyNov 28, 2007
  19. Johannes SchindelinNov 28, 2007
  20. Johannes SchindelinNov 28, 2007
  21. Johannes SixtNov 28, 2007
  22. Johannes SchindelinNov 28, 2007
  23. Johannes SixtNov 28, 2007
  24. Replace instances of export VAR=VAL with VAR=VAL; export VARJohannes Schindelin, Nov 28, 2007
  25. David KastrupNov 28, 2007
  26. Junio C HamanoNov 28, 2007
  27. David KastrupNov 28, 2007
  28. Jeff KingNov 28, 2007
  29. David KastrupNov 28, 2007
  30. Johannes SixtNov 29, 2007
  31. David KastrupNov 29, 2007
  32. Johannes SchindelinNov 28, 2007
  33. Junio C HamanoNov 28, 2007
  34. Johannes SchindelinNov 28, 2007
  35. Junio C HamanoNov 28, 2007
  36. Johannes SchindelinNov 28, 2007
  37. David KastrupNov 28, 2007
  38. Junio C HamanoNov 28, 2007
  39. Junio C HamanoNov 26, 2007
  40. Marco CostalbaNov 26, 2007
  41. Shawn O. PearceNov 27, 2007
  42. Junio C HamanoNov 27, 2007
  43. Johannes SchindelinNov 26, 2007

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.