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

Re: linux-next: unnecessary merge in the v4l-dvb tree

From
Junio C Hamano <gitster@pobox.com>
Date
Feb 13, 2018, 17:18 UTC
Message-ID
<xmqqmv0crepg.fsf@gitster-ct.c.googlers.com>
In-Reply-To
<20180212222157.0a3bd472@vento.lan>
Mauro Carvalho Chehab <mchehab@osg.samsung.com> writes:
Show 24 quoted lines
> Yes, that's my pain. I don't want ff only when pulling from others,
> only when pulling from upstream tree.
>
>> 
>> We may want per-remote equivalent for it, i.e. e.g.
>> 
>> 	[pull]
>> 		ff=false ;# good default for collecting contributions
>> 
>> 	[remote "torvalds"] 
>> 		pullFF = only ;# good default for catching up
>> 
>> or something like that, perhaps?
>
>
> Yeah, something like that works. Please notice, however, that what I
> usually do is:
>
> 	$ git remote update torvalds
> 	$ git merge <tag>
> 	  (or git pull . <tag>)
>
> So, for the above to work, it should store somehow the remote from
> where a tag came from.

That makes me wonder if another heuristic I floated earlier is more appropriate. When merging a tag object T, if refs/tags/T exists and it is that tag object, then an updated "merge" would default to "--ff"; otherwise, it would keep the current default of creating a merge even when we could fast-forward, in order to record that tag T in the resulting history.

Of course, end users can use command line options to override such heuristics anyway, but if the behaviour based on the new heuristic is easy to explain and understand, and covers majority of the use cases without command line override, then we might not even need a new configuration mechanism like remove.torvalds.pullFF mentioned above.

Previous: Mauro Carvalho ChehabNext: Linus Torvalds
Message 9 of 15 in “Re: linux-next: unnecessary merge in the v4l-dvb tree”
  1. Linus TorvaldsFeb 12, 2018
  2. Mauro Carvalho ChehabFeb 12, 2018
  3. Junio C HamanoFeb 12, 2018
  4. Linus TorvaldsFeb 12, 2018
  5. Junio C HamanoFeb 12, 2018
  6. Linus TorvaldsFeb 12, 2018
  7. Junio C HamanoFeb 12, 2018
  8. Mauro Carvalho ChehabFeb 13, 2018
  9. Junio C HamanoFeb 13, 2018
  10. Linus TorvaldsFeb 13, 2018
  11. Junio C HamanoFeb 14, 2018
  12. merge: allow fast-forward when merging a tracked tagJunio C Hamano, Feb 15, 2018
  13. Eric SunshineFeb 15, 2018
  14. Junio C HamanoFeb 16, 2018
  15. merge: allow fast-forward when merging a tracked tagJunio C Hamano, Feb 16, 2018

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.