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

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

From
MCMauro Carvalho Chehab <mchehab@osg.samsung.com>
Date
Feb 13, 2018, 00:21 UTC
Message-ID
<20180212222157.0a3bd472@vento.lan>
In-Reply-To
<xmqqzi4drczv.fsf@gitster-ct.c.googlers.com>

Em Mon, 12 Feb 2018 15:42:44 -0800 Junio C Hamano <gitster@pobox.com> escreveu:

Show 32 quoted lines
> Linus Torvalds <torvalds@linux-foundation.org> writes:
> 
> > And some maintainers end up using multiple repositories as branches
> > (the old _original_ git model). Again, you can just use "git fetch +
> > git reset", of course, but that's a bit unsafe. In contrast, doing
> > "git pull --ff-only" is a safe convenient operation that does both the
> > fetch and the update to whatever state.
> >
> > But you do need that "--ff-only" to avoid the merge.  
> 
> OK.  I guess it is legit (and semi-sensible) for downstream
> contributors to "git pull --ff-only $upstream $release_tag_X" to
> bring their long-running topic currently based on release X-1 up to
> date with respect to release X.  It probably makes more sense than
> rebasing on top of release X, even though it makes a lot less sense
> than merging their topics into release X.
> 
> As you said, pull of a tag that forbids fast-forward by default is
> rather old development (I am kind of surprised that it was so old,
> in v1.7.9), so it may be a bit difficult to transition.
> 
> There is 
> 
> 	[pull]
>                 ff = only
> 
> but pull.ff is quite global, and not good for intermediate level
> maintainers who pull to integrate work of their downstream (for
> which they do want the current "do not ff, record the tag in a merge
> commit" behaviour) and also pull to catch up from their upstream
> (which they want "ff-when-able").  They need to control between
> ff=only and ff=when-able, depending on whom they are pulling from.

Yes, that's my pain. I don't want ff only when pulling from others, only when pulling from upstream tree.

Show 10 quoted lines
> 
> 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.

The reason is that I keep locally a cache with several tree clones (in bare mode) s that I bother enough to cache (linus, -stable, -next), as pulling from BR is time consuming, and I want to do it only once and use the same "cache" for all my git clones.

I have a few git workdirs for my upstream work, but, as a patch developer, I also have "independent"[1] git repositories.

[1] Due to disk constraints, the clones actually use --shared. So, the common objects are actually stored inside a single tree.

Thanks, Mauro

Previous: Junio C HamanoNext: Junio C Hamano
Message 8 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.