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

Re: [PATCH v5 0/6] Reject non-ff pulls by default

From
Junio C Hamano <gitster@pobox.com>
Date
Apr 30, 2014, 19:28 UTC
Message-ID
<xmqqtx9aehws.fsf@gitster.dls.corp.google.com>
In-Reply-To
<53614470489f9_f9b15012ecbc@nysa.notmuch>
Felipe Contreras <felipe.contreras@gmail.com> writes:
Show 9 quoted lines
> Junio C Hamano wrote:
> ...
>> Until the "--merge" option is added, "pull.mode = merge" cannot be
>> the same as "git pull --merge".  I think you either need to squash
>> these two steps into one, or flip the order of them.
>
> Yeah, but the documentation of --merge should mention `pull.mode` and
> `branch.<name>.pullmode`. If I do --merge first I would have to mention
> pull.rebase and branch.<name>.rebase, which is weird.

And the point of your step (1) to introduce pull.mode is to fix the weirdness, so in that sense, it makes even more sense to do the "--merge" first and then pull.mode the second.

If you first add --merge with an awkward documentation in the first step and then correct that awkwardness in the second step that adds pull.mode (oh, by the way, we need to pay attention to pull.rename as a fallback at least for a while), that would show a clear justification why pull.mode is a good idea.

> I think it's more sensible to do the less visible changes first.

The people who discover pull.mode and set it to "merge" will be greeted with an error with that step.

So it appears that squashing these two (and possibly also the addition of merge-ff-only) into a single step would be the only alternative, if you want to avoid the "introduce something that shows the awkwardness of the situation and immediately fix it" approach.

Previous: Junio C Hamano
Message 19 of 19 in “Reject non-ff pulls by default”
  1. 0/6 Reject non-ff pulls by defaultFelipe Contreras, Apr 29, 2014
  2. 1/6 pull: rename pull.rename to pull.modeFelipe Contreras, Apr 29, 2014
  3. Marat RadchenkoApr 29, 2014
  4. Felipe ContrerasApr 29, 2014
  5. Philip OakleyApr 29, 2014
  6. Felipe ContrerasApr 29, 2014
  7. Philip OakleyApr 29, 2014
  8. Richard HansenApr 30, 2014
  9. 2/6 pull: migrate all the tests to pull.modeFelipe Contreras, Apr 29, 2014
  10. 3/6 pull: refactor $rebase variable into $modeFelipe Contreras, Apr 29, 2014
  11. 4/6 pull: add --merge optionFelipe Contreras, Apr 29, 2014
  12. 5/6 pull: add merge-ff-only optionFelipe Contreras, Apr 29, 2014
  13. 6/6 pull: only allow ff merges by defaultFelipe Contreras, Apr 29, 2014
  14. Junio C HamanoApr 30, 2014
  15. Felipe ContrerasApr 30, 2014
  16. Junio C HamanoApr 30, 2014
  17. Felipe ContrerasApr 30, 2014
  18. Junio C HamanoApr 30, 2014
  19. Junio C HamanoApr 30, 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.