From: Michael Haggerty <mhagger@alum.mit.edu>
To: "Jakub Narębski" <jnareb@gmail.com>,
"Michael J Gruber" <git@drmicha.warpmail.net>,
"git discussion list" <git@vger.kernel.org>
Subject: Re: Our merge bases sometimes suck
Date: Sat, 14 Jun 2014 00:14:42 +0200 [thread overview]
Message-ID: <539B77D2.3020307@alum.mit.edu> (raw)
In-Reply-To: <539B1E59.1030604@gmail.com>
On 06/13/2014 05:52 PM, Jakub Narębski wrote:
> I don't know if it has been fixed, but there is a difference
> between "git diff A...B" when A and B have one merge base, and
> "git diff A...B" when there are more than one merge base.
>
> When there is one merge base, "git diff A...B" returns simple
> unified diff equivalent to "git diff $(git merge-base A B) B".
> It is unsymmetric.
>
> But where there are more than one merge base, by design or by
> accident for "git diff A...B" git 1.9.2 / 1.7.4 returns
>
> git diff --cc $(git merge-base --all A B) A B
>
> which is *symmetric*, and is combined not unified diff.
Thanks for the information. This doesn't seem to be the case in git
2.0.0. For example, commit 8c0db2f519 in the git project is a merge
with two merge bases:
$ git --version
git version 2.0.0
$ c=8c0db2f5193153ea8a51bb45b0512c5a3889023b
$ git merge-base --all $c^1 $c^2
a15f43312f6962959e8daa33df0cf5357852a4b8
9a0e6731c632c841cd2de9dec0b9091b2f10c6fd
$ git diff $c^1...$c^2 | head -20
diff --git a/Documentation/git-rev-parse.txt
b/Documentation/git-rev-parse.txt
index d638bfc..29b5789 100644
--- a/Documentation/git-rev-parse.txt
+++ b/Documentation/git-rev-parse.txt
@@ -77,6 +77,14 @@ OPTIONS
path of the top-level directory relative to the current
directory (typically a sequence of "../", or an empty string).
+--git-dir::
+ Show `$GIT_DIR` if defined else show the path to the .git directory.
+
+--short, --short=number::
+ Instead of outputting the full SHA1 values of object names try to
+ abbriviate them to a shorter unique name. When no length is specified
+ 7 is used. The minimum length is 4.
+
--since=datestring, --after=datestring::
Parses the date string, and outputs corresponding
--max-age= parameter for git-rev-list command.
diff --git a/git-archimport.perl b/git-archimport.perl
Michael
--
Michael Haggerty
mhagger@alum.mit.edu
next prev parent reply other threads:[~2014-06-13 22:14 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-12 22:12 Our merge bases sometimes suck Michael Haggerty
2014-06-13 9:38 ` Michael J Gruber
2014-06-13 10:13 ` Michael Haggerty
2014-06-13 15:52 ` Jakub Narębski
2014-06-13 22:14 ` Michael Haggerty [this message]
2014-06-13 22:35 ` Junio C Hamano
2014-06-17 15:08 ` Junio C Hamano
2014-06-17 15:44 ` Michael Haggerty
2014-06-20 6:53 ` Junio C Hamano
2014-06-20 8:53 ` Michael Haggerty
2014-06-20 21:17 ` Nico Williams
2014-06-23 11:43 ` Jakub Narębski
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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=539B77D2.3020307@alum.mit.edu \
--to=mhagger@alum.mit.edu \
--cc=git@drmicha.warpmail.net \
--cc=git@vger.kernel.org \
--cc=jnareb@gmail.com \
/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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).