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

Re: first parent, commit graph layout, and pull merge direction

From
Felipe Contreras <felipe.contreras@gmail.com>
Date
May 23, 2013, 23:53 UTC
Message-ID
<CAMP44s1D06ggmTjXBEL0puFLqYDShhy6HV0S+oj0AwDGz-sUqA@mail.gmail.com>
In-Reply-To
<7vzjvlb7mu.fsf@alter.siamese.dyndns.org>
On Thu, May 23, 2013 at 6:26 PM, Junio C Hamano <gitster@pobox.com> wrote:
Show 31 quoted lines
> Felipe Contreras <felipe.contreras@gmail.com> writes:
>
>>>>> Unless your primary user base is those who use Git as a deployment
>>>>> tool to always follow along the tip of some external repository
>>>>> without doing anything on your own on the branch you run your "git
>>>>> pull" on, defaulting it to --ff-only does not make much sense to me.
>>>>
>>>> A lot of people do stuff, but the rebase it.
>>>
>>> If I am parsing the above properly, I think that is only saying that
>>> "pull --rebase" makes sense for people who do real work, which I am
>>> not disagreeing.
>>
>> You claimed that 'git pull' (--ff-only) only makes sense if the
>> primary user-base doesn't do any work on it, but that's not true; they
>> can do a 'git rebase' after such pull (or a merge).
>
> Either you misread what I wrote or I was unclear.  I really meant
> "anything on your own *ON* THE BRANCH YOU RUN your "git pull" on".
> With
>
>         git checkout frotz ; git pull --ff-only
>
> you do not do anything "on frotz" other than following along.  You
> can of course commit, rebase and all others on other branches like
> xyzzy and push them out directly.  But you cannot even do this once
>
>         git checkout frotz; git merge xyzzy
>
> if you expect the next "git checkout frotz; git pull --ff-only" will
> keep working usefuly.

Unless you rebase. We could of course have a 'branch.<name>.allow_merge' configuration that gets automatically turned on the first time a 'git merge' is executed, but I feel that creates more inconsistency.

Show 9 quoted lines
>> We don't have to assume our primary user-base wants to do full fledged
>> merges, in fact, such assumption would be wrong.
>
> I think we are in agreement on that point already.
>
> An assumption that people who do merges are somehow more well versed
> in Git and are more capable than others to configure their
> repository or they will not be annoyed if you asked them a single
> configuration change is also wrong, though.
s/people who do merges/people who should do merges/
And no, it's not wrong. People who do merges should know what they are doing.
The alternatives are these:

a) you annoy the vast majority of the user-base by making 'git pull' a dangerous operation that should be avoided, and replaced with 'git fetch'+'git rebase'.

b) you annoy a minority of the user-base by making 'git pull' not do the merge the expected, so they have to do +'git merge' (which is already less of a change than a)), or configure the default (which they most likely are able to do, if they did intent to do a merge).

b) is clearly superior.
-- 
Felipe Contreras
Previous: Junio C HamanoNext: John Keeping
Message 18 of 69 in “first parent, commit graph layout, and pull merge direction”
  1. Andreas KreyMay 22, 2013
  2. Junio C HamanoMay 22, 2013
  3. Andreas KreyMay 23, 2013
  4. John SzakmeisterMay 23, 2013
  5. Jeremy RosenMay 23, 2013
  6. Andreas KreyMay 23, 2013
  7. John KeepingMay 23, 2013
  8. Junio C HamanoMay 23, 2013
  9. John KeepingMay 23, 2013
  10. Junio C HamanoMay 23, 2013
  11. John KeepingMay 23, 2013
  12. Felipe ContrerasMay 23, 2013
  13. Junio C HamanoMay 23, 2013
  14. Felipe ContrerasMay 23, 2013
  15. Junio C HamanoMay 23, 2013
  16. Felipe ContrerasMay 23, 2013
  17. Junio C HamanoMay 23, 2013
  18. Felipe ContrerasMay 23, 2013
  19. John KeepingMay 24, 2013
  20. John SzakmeisterMay 24, 2013
  21. Linus TorvaldsMay 24, 2013
  22. Junio C HamanoMay 24, 2013
  23. Linus TorvaldsMay 24, 2013
  24. Felipe ContrerasMay 24, 2013
  25. Felipe ContrerasMay 24, 2013
  26. Junio C HamanoMay 24, 2013
  27. Philip OakleyMay 24, 2013
  28. pull: require choice between rebase/merge on non-fast-forward pullJunio C Hamano, Jun 27, 2013
  29. W. Trevor KingJun 27, 2013
  30. Junio C HamanoJun 27, 2013
  31. W. Trevor KingJun 28, 2013
  32. Matthieu MoyJun 28, 2013
  33. W. Trevor KingJun 28, 2013
  34. Matthieu MoyJun 28, 2013
  35. W. Trevor KingJun 28, 2013
  36. Fredrik GustafssonJun 27, 2013
  37. Junio C HamanoJun 27, 2013
  38. W. Trevor KingJun 27, 2013
  39. Junio C HamanoJun 27, 2013
  40. Matthieu MoyJun 27, 2013
  41. W. Trevor KingJun 28, 2013
  42. John KeepingJun 28, 2013
  43. Junio C HamanoJun 28, 2013
  44. John KeepingJun 28, 2013
  45. Junio C HamanoJun 28, 2013
  46. John KeepingJul 2, 2013
  47. fixup! pull: require choice between rebase/merge on non-fast-forward pullJohn Keeping, Jul 14, 2013
  48. Junio C HamanoJul 15, 2013
  49. Felipe ContrerasAug 28, 2013
  50. John KeepingJul 18, 2013
  51. Andreas SchwabJul 18, 2013
  52. Junio C HamanoJul 18, 2013
  53. pull: require choice between rebase/merge on non-fast-forward pullJunio C Hamano, Jul 18, 2013
  54. Eric SunshineJul 19, 2013
  55. Junio C HamanoJul 19, 2013
  56. Eric SunshineJul 19, 2013
  57. Junio C HamanoJul 19, 2013
  58. Eric SunshineJul 19, 2013
  59. Junio C HamanoJul 19, 2013
  60. FlimmJan 22, 2014
  61. Andreas KreyMay 24, 2013
  62. Junio C HamanoMay 24, 2013
  63. Andreas KreyMay 23, 2013
  64. Holger Hellmuth (IKS)May 24, 2013
  65. Andreas KreyMay 24, 2013
  66. Holger Hellmuth (IKS)May 24, 2013
  67. Andreas KreyMay 24, 2013
  68. Felipe ContrerasMay 23, 2013
  69. Andreas KreyMay 23, 2013

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.