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

Re: git merge remote branch says "Merge commit ..."?

From
Jeff King <peff@peff.net>
Date
May 23, 2009, 09:17 UTC
Message-ID
<20090523091711.GB20416@coredump.intra.peff.net>
In-Reply-To
<200905222030.34301.j6t@kdbg.org>
On Fri, May 22, 2009 at 08:30:34PM +0200, Johannes Sixt wrote:
Show 7 quoted lines
> On Freitag, 22. Mai 2009, Jeff King wrote:
> > No, it is not terribly expensive. But you do have to talk to the server,
> > which may mean making an ssh connection, or the server may be overloaded
> > and slow. So it can take a few seconds instead of a few microseconds.
> 
> It's certainly doable without a remote connection with some digging in the 
> configuration.
Er, I think we have gotten a bit off track.

Yes, it's clearly possible to pretend you fetched but not actually do so when doing "git merge origin/master" (and the patch I posted does something close, but doesn't fill in the actual remote name; you just get "remote branch origin/master").

All the other part of this thread was just me claiming that:
  git fetch origin
  git log origin...
  git merge origin

Is a totally valid workflow, and that the answer should not be "those people should just run pull".

Show 5 quoted lines
> Git-gui has some magic to find out the remote when you request to merge a 
> remote tracking branch. That is, even though you clickety-click through to do 
> the equivalent of 'git merge origin/master', it comes up with a merge message 
> that is the same as if you had said 'git pull origin master' on the command 
> line. It doesn't need a connection to do that.

Right. We could probably use similar logic in "git merge". I'm not sure if it is worth the trouble to end up with "Merge branch 'master' of origin" instead of "Merge remote branch 'origin/master'".

-Peff
Previous: Johannes SixtNext: Junio C Hamano
Message 8 of 10 in “git merge remote branch says "Merge commit ..."?”
  1. skillzero@gmail.comMay 21, 2009
  2. Jeff KingMay 22, 2009
  3. Eric RaibleMay 22, 2009
  4. Jeff KingMay 22, 2009
  5. Eric RaibleMay 22, 2009
  6. Jeff KingMay 22, 2009
  7. Johannes SixtMay 22, 2009
  8. Jeff KingMay 23, 2009
  9. Junio C HamanoMay 23, 2009
  10. Jeff KingMay 25, 2009

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.