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

Re: [PATCH v2 06/14] pull: move default warning

From
Felipe Contreras <felipe.contreras@gmail.com>
Date
Dec 4, 2020, 23:36 UTC
Message-ID
<CAMP44s2T4HSVAwx6D3sO5c8b_tSKT174eASTjmb61kKmm=JcwQ@mail.gmail.com>
In-Reply-To
<CABPp-BHH0baiECvtvVOoHR82upJ1C+0hy-ukS9Hi2ZFHh19nOg@mail.gmail.com>
On Fri, Dec 4, 2020 at 5:18 PM Elijah Newren <newren@gmail.com> wrote:
Show 10 quoted lines
>
> On Thu, Dec 3, 2020 at 10:16 PM Felipe Contreras
> <felipe.contreras@gmail.com> wrote:
> >
> > Up to the point where can check if we can fast-forward or not.
>
> Seem to be missing some subjects in that sentence.  ;-)  Perhaps:
>
> Move the default warning to the point where we can check if we can
> fast-forward or not.
Yes, I missed a "we".

I usually continue what I said in the subject, but lately while reviewing my own patches in lore.kernel.org I've found it hard to understand the first paragraph since it's not easy to find the subject.

Maybe I should stop doing that.
> > No functional changes.
>
> You didn't explain the reasoning for the change here, though I suspect
> it makes it easier to change the default to ff-only later.
Right, I noticed that after the nth time I reviewed the series.

It's not actually to change the default to ff-only, it's mainly to display the annoying warning only when a non-fast-forward pull is being attempted.

I'll add that to the commit message.
Show 10 quoted lines
> However,
> looking over the patch and pulling up the code, I actually find it
> pretty odd that this warning was in a function named
> config_get_rebase().  The warning is not rebase-specific, and so
> clearly does not belong there.  And for such a function name, the only
> kinds of warnings I'd expect are ones where the user configured some
> option but set it to a value that cannot make sense.  So it all around
> seems like the wrong place to me, and I find your patch to be a good
> cleanup.  It would benefit from a slightly improved commit message
> though.  :-)

Indeed. The only reason it's there is that it's the only place we know the user has not done either --rebase, or --merge (--no-rebase), or the config equivalents.

I fixed that by introducing a default_mode flag, but in other patch series I replace default_mode with a check for REBASE_DEFAULT (which doesn't exist yet).

Cheers.
-- 
Felipe Contreras
Previous: Elijah NewrenNext: Felipe Contreras
Message 50 of 79 in “pull: default warning improvements”
  1. 00/14 pull: default warning improvementsFelipe Contreras, Dec 4, 2020
  2. 03/14 pull: refactor fast-forward checkFelipe Contreras, Dec 4, 2020
  3. 04/14 pull: cleanup autostash checkFelipe Contreras, Dec 4, 2020
  4. Elijah NewrenDec 4, 2020
  5. Felipe ContrerasDec 5, 2020
  6. Elijah NewrenDec 5, 2020
  7. 01/14 doc: pull: explain what is a fast-forwardFelipe Contreras, Dec 4, 2020
  8. Elijah NewrenDec 4, 2020
  9. Jacob KellerDec 5, 2020
  10. 02/14 pull: improve default warningFelipe Contreras, Dec 4, 2020
  11. Elijah NewrenDec 4, 2020
  12. Felipe ContrerasDec 5, 2020
  13. Elijah NewrenDec 5, 2020
  14. Felipe ContrerasDec 5, 2020
  15. Chris TorekDec 5, 2020
  16. Felipe ContrerasDec 5, 2020
  17. Elijah NewrenDec 5, 2020
  18. Felipe ContrerasDec 5, 2020
  19. Elijah NewrenDec 6, 2020
  20. Felipe ContrerasDec 6, 2020
  21. Junio C HamanoDec 7, 2020
  22. Felipe ContrerasDec 7, 2020
  23. Junio C HamanoDec 7, 2020
  24. Felipe ContrerasDec 7, 2020
  25. Junio C HamanoDec 7, 2020
  26. Felipe ContrerasDec 7, 2020
  27. Jacob KellerDec 7, 2020
  28. Junio C HamanoDec 8, 2020
  29. Felipe ContrerasDec 8, 2020
  30. Junio C HamanoDec 8, 2020
  31. Felipe ContrerasDec 9, 2020
  32. Elijah NewrenDec 9, 2020
  33. Felipe ContrerasDec 10, 2020
  34. Junio C HamanoDec 10, 2020
  35. Felipe ContrerasDec 10, 2020
  36. Felipe ContrerasDec 10, 2020
  37. Junio C HamanoDec 11, 2020
  38. Felipe ContrerasDec 11, 2020
  39. Junio C HamanoDec 14, 2020
  40. Felipe ContrerasDec 14, 2020
  41. Junio C HamanoDec 14, 2020
  42. Felipe ContrerasDec 15, 2020
  43. Jeff KingDec 15, 2020
  44. Felipe ContrerasDec 15, 2020
  45. Junio C HamanoDec 15, 2020
  46. Felipe ContrerasDec 15, 2020
  47. Felipe ContrerasDec 7, 2020
  48. 06/14 pull: move default warningFelipe Contreras, Dec 4, 2020
  49. Elijah NewrenDec 4, 2020
  50. Felipe ContrerasDec 4, 2020
  51. 05/14 pull: trivial cleanupFelipe Contreras, Dec 4, 2020
  52. Elijah NewrenDec 4, 2020
  53. Felipe ContrerasDec 5, 2020
  54. 08/14 pull: trivial whitespace style fixFelipe Contreras, Dec 4, 2020
  55. 10/14 pull: add proper error with --ff-onlyFelipe Contreras, Dec 4, 2020
  56. Elijah NewrenDec 4, 2020
  57. Felipe ContrerasDec 5, 2020
  58. 12/14 pull: show warning with --ffFelipe Contreras, Dec 4, 2020
  59. Elijah NewrenDec 4, 2020
  60. Felipe ContrerasDec 5, 2020
  61. 14/14 test: pull-options: revert unnecessary changesFelipe Contreras, Dec 4, 2020
  62. Elijah NewrenDec 4, 2020
  63. Felipe ContrerasDec 5, 2020
  64. 13/14 test: merge-pull-config: trivial cleanupFelipe Contreras, Dec 4, 2020
  65. Elijah NewrenDec 4, 2020
  66. 11/14 tentative: pull: change the semantics of --ff-onlyFelipe Contreras, Dec 4, 2020
  67. Elijah NewrenDec 4, 2020
  68. Felipe ContrerasDec 5, 2020
  69. experiment: pull: change --ff-only and default modeFelipe Contreras, Dec 5, 2020
  70. Elijah NewrenDec 5, 2020
  71. Felipe ContrerasDec 5, 2020
  72. Junio C HamanoDec 7, 2020
  73. Felipe ContrerasDec 5, 2020
  74. 07/14 pull: display default warning only when non-ffFelipe Contreras, Dec 4, 2020
  75. Elijah NewrenDec 4, 2020
  76. Felipe ContrerasDec 5, 2020
  77. 09/14 pull: introduce --merge optionFelipe Contreras, Dec 4, 2020
  78. Elijah NewrenDec 4, 2020
  79. Felipe ContrerasDec 5, 2020

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.