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

Re: Pull is Evil

From
W. Trevor King <wking@tremily.us>
Date
May 2, 2014, 01:10 UTC
Message-ID
<20140502011004.GD28634@odin.tremily.us>
In-Reply-To
<5362e8b09aba1_429131b31038@nysa.notmuch>
On Thu, May 01, 2014 at 07:37:04PM -0500, Felipe Contreras wrote:
Show 13 quoted lines
> W. Trevor King wrote:
> > On Thu, May 01, 2014 at 06:25:16PM -0500, Felipe Contreras wrote:
> > > W. Trevor King wrote:
> > > > Fast-forward $current_branch by $count commits to $repository
> > > > $refpec?
> > > 
> > > Why would anyone say 'no' to this one?
> > 
> > Because the want explicit merges when they bring in topic
> > branches?
> 
> If that was the case the user wouls have run `git merge
> --no-ff`. Only expereinced users would answer 'no'.

Folks who are setting any ff options don't need any of these training wheels. My proposed --prompt behavior is for folks who think “I often run this command without thinking it through all the way. I'm also not used to reading Git's output and using 'reset --hard' with the reflog to reverse changes. Instead of trusting me to only say what I mean or leaving me to recover from mistakes, please tell me what's about to change and let me opt out if I've changed my mind.”

Show 14 quoted lines
> > > > and have a chance to bail out if you saw:
> > > > 
> > > >   Merge 1003 commits from git://example.net/main.git master into my-feature?
> > > > 
> > > > because you forgot which branch you were on.
> > > 
> > > Yes, that might be nice. But we still need to change the defaults.
> > 
> > So I should submit an orthogonal patch with -i/--interative/--prompt?
> 
> I'm not entirely sure what would be the ideal behavior.
> 
> For example, I'm thinking that by default when the a fast-forward is
> possible, just do it, …

But just because a ff is possible doesn't mean it's what the user/project wants. It may be the most likely guess, but why guess when they've explicitly asked for a prompt?

> when it's not, ask if the user wants to do a merge or a rebase, if
> the user just press 'enter' a merge is attempted.

I'll just mimic however mergetool currently handles prompt accept/decline.

> In addition a summary of the commits ahead behind would be helpful.
Good idea.
> If the user wants to cancel the operation, he can just do CTRL+C.
I'll just mimic mergetool.

Cheers, Trevor

-- 
This email may be signed or encrypted with GnuPG (http://www.gnupg.org).
For more information, see http://en.wikipedia.org/wiki/Pretty_Good_Privacy
Previous: Felipe ContrerasNext: Felipe Contreras
Message 25 of 73 in “A failing attempt to use Git in a centralized environment”
  1. Marat RadchenkoApr 28, 2014
  2. Junio C HamanoApr 28, 2014
  3. Pull is Evil (was: Re: A failing attempt to use Git in a centralized environment)Marc Branchaud, Apr 30, 2014
  4. Junio C HamanoApr 30, 2014
  5. Marc BranchaudApr 30, 2014
  6. Jonathan NiederApr 30, 2014
  7. Junio C HamanoApr 30, 2014
  8. Marc BranchaudApr 30, 2014
  9. Andreas KreyMay 2, 2014
  10. David KastrupMay 2, 2014
  11. Andreas KreyMay 3, 2014
  12. David KastrupMay 3, 2014
  13. Felipe ContrerasApr 30, 2014
  14. Marc BranchaudApr 30, 2014
  15. Felipe ContrerasApr 30, 2014
  16. brian m. carlsonMay 1, 2014
  17. Felipe ContrerasMay 1, 2014
  18. Junio C HamanoMay 1, 2014
  19. Felipe ContrerasMay 1, 2014
  20. W. Trevor KingMay 1, 2014
  21. W. Trevor KingMay 1, 2014
  22. Felipe ContrerasMay 1, 2014
  23. W. Trevor KingMay 2, 2014
  24. Felipe ContrerasMay 2, 2014
  25. W. Trevor KingMay 2, 2014
  26. Felipe ContrerasMay 2, 2014
  27. W. Trevor KingMay 2, 2014
  28. Felipe ContrerasMay 2, 2014
  29. W. Trevor KingMay 2, 2014
  30. David KastrupMay 2, 2014
  31. Felipe ContrerasMay 2, 2014
  32. W. Trevor KingMay 2, 2014
  33. Felipe ContrerasMay 2, 2014
  34. W. Trevor KingMay 2, 2014
  35. Felipe ContrerasMay 2, 2014
  36. pull.prompt or other way to slow/disable 'git pull' (was: Pull is Evil)W. Trevor King, May 2, 2014
  37. Felipe ContrerasMay 2, 2014
  38. W. Trevor KingMay 3, 2014
  39. Felipe ContrerasMay 3, 2014
  40. W. Trevor KingMay 4, 2014
  41. Felipe ContrerasMay 4, 2014
  42. Felipe ContrerasMay 1, 2014
  43. Marc BranchaudMay 1, 2014
  44. W. Trevor KingMay 1, 2014
  45. Marc BranchaudMay 1, 2014
  46. W. Trevor KingMay 1, 2014
  47. Marc BranchaudMay 1, 2014
  48. Felipe ContrerasMay 1, 2014
  49. Andreas KreyMay 2, 2014
  50. Felipe ContrerasMay 2, 2014
  51. Junio C HamanoMay 2, 2014
  52. Junio C HamanoMay 2, 2014
  53. brian m. carlsonMay 1, 2014
  54. Felipe ContrerasMay 1, 2014
  55. Felipe ContrerasMay 1, 2014
  56. Marc BranchaudMay 1, 2014
  57. Felipe ContrerasMay 1, 2014
  58. Philip OakleyMay 1, 2014
  59. Philip OakleyMay 1, 2014
  60. Felipe ContrerasMay 1, 2014
  61. W. Trevor KingMay 1, 2014
  62. Felipe ContrerasMay 2, 2014
  63. Felipe ContrerasApr 30, 2014
  64. Matthieu MoyApr 30, 2014
  65. Felipe ContrerasApr 30, 2014
  66. Junio C HamanoApr 30, 2014
  67. Felipe ContrerasApr 30, 2014
  68. Junio C HamanoApr 30, 2014
  69. Felipe ContrerasApr 30, 2014
  70. Stepan KasalApr 30, 2014
  71. Geert BoschApr 30, 2014
  72. John SzakmeisterMay 4, 2014
  73. Max KirillovMay 2, 2014

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.