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

"Already up-to-date!" merge isn't a no-op?

From
SBStephen Bash <bash@genarts.com>
Date
Mar 6, 2013, 21:48 UTC
Message-ID
<142915274.2151729.1362606487755.JavaMail.root@genarts.com>
In-Reply-To
<1826064298.2151517.1362605175796.JavaMail.root@genarts.com>
Hi all-
I have a branch history that looks like this:
 ----------M-----M-- master
  \       /     /
   x---------------- feature
    \             \
     x-------------A- maint
In other words we had a new feature that was "so cool" that after testing on master was back-ported to maint (luckily we knew ahead of time this was likely).  When it came time to merge feature into maint the process looked something like this:
Yesterday (not shown above):
 $ git checkout master
 $ git merge maint
Today:
 $ git checkout maint
 $ git merge feature
 Merge made by the 'recursive' strategy.
 $ git checkout master
 $ git merge maint
 Already up-to-date!
 Merge made by the 'recursive' strategy.
 $ git --version
 git version 1.8.1.5
In the past, I've only seen "Already up-to-date!" when there is literally nothing to do (all commits are reachable from HEAD).  In this case, the merge of feature into maint (commit A) is the only commit not reachable from HEAD, and Git does create a merge commit (though the new commit and the first parent point to the same tree).  The fact that a commit is created makes me call this something more than a no-op, even though no content changed.
So what is the actual meaning of "Already up-to-date!"?  Is it based on the tree, the reachable commits, or something more complicated?

Thanks, Stephen

Next: Junio C Hamano
Message 1 of 2 in “"Already up-to-date!" merge isn't a no-op?”
  1. Stephen BashMar 6, 2013
  2. Junio C HamanoMar 6, 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.