{"thread":{"id":"33092","subject":"\"Already up-to-date!\" merge isn't a no-op?","startedAt":"2013-03-06T21:48:07Z","lastAt":"2013-03-06T22:08:12Z","messageCount":2,"participants":["Stephen Bash","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"210727","messageId":"142915274.2151729.1362606487755.JavaMail.root@genarts.com","threadId":"33092","inReplyTo":"1826064298.2151517.1362605175796.JavaMail.root@genarts.com","subject":"\"Already up-to-date!\" merge isn't a no-op?","fromName":"Stephen Bash","fromEmail":"bash@genarts.com","sentAt":"2013-03-06T21:48:07Z","receivedAt":"2013-03-06T21:48:07Z","isPatch":false,"sender":{"key":"bash@genarts.com","avatar":null},"body":"Hi all-\n\nI have a branch history that looks like this:\n\n ----------M-----M-- master\n  \\       /     /\n   x---------------- feature\n    \\             \\\n     x-------------A- maint\n\nIn 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:\n\nYesterday (not shown above):\n $ git checkout master\n $ git merge maint\n\nToday:\n $ git checkout maint\n $ git merge feature\n Merge made by the 'recursive' strategy.\n $ git checkout master\n $ git merge maint\n Already up-to-date!\n Merge made by the 'recursive' strategy.\n $ git --version\n git version 1.8.1.5\n\nIn 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.\n\nSo what is the actual meaning of \"Already up-to-date!\"?  Is it based on the tree, the reachable commits, or something more complicated?\n\nThanks,\nStephen\n"},{"id":"210729","messageId":"7v38w8p4fn.fsf@alter.siamese.dyndns.org","threadId":"33092","inReplyTo":"142915274.2151729.1362606487755.JavaMail.root@genarts.com","subject":"Re: \"Already up-to-date!\" merge isn't a no-op?","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2013-03-06T22:08:12Z","receivedAt":"2013-03-06T22:08:12Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Stephen Bash <bash@genarts.com> writes:\n\n> So what is the actual meaning of \"Already up-to-date!\"?  Is it\n> based on the tree, the reachable commits, or something more\n> complicated?\n\nThe resulting tree of the merge happened to be the same as the\noriginal tree (i.e. \"git diff HEAD^ HEAD\" is empty).\n\nThis happens quite often and is perfectly normal.  After merging\ntopics that has been cooking in 'next' to 'master', merging the\nresulting 'master' to 'next' is likely to result in that situation,\nunless 'master' has gained some other changes, such as updating the\ndraft release notes with a commit on it, or applying an obvious and\ntrivial fix before cooking it in 'next'.\n"}]}