git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Bash <bash@genarts.com>
To: Git Mailing List <git@vger.kernel.org>
Subject: "Already up-to-date!" merge isn't a no-op?
Date: Wed, 6 Mar 2013 16:48:07 -0500 (EST)	[thread overview]
Message-ID: <142915274.2151729.1362606487755.JavaMail.root@genarts.com> (raw)
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

       reply	other threads:[~2013-03-06 21:59 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1826064298.2151517.1362605175796.JavaMail.root@genarts.com>
2013-03-06 21:48 ` Stephen Bash [this message]
2013-03-06 22:08   ` "Already up-to-date!" merge isn't a no-op? Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=142915274.2151729.1362606487755.JavaMail.root@genarts.com \
    --to=bash@genarts.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).