git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Michael J Gruber <git@drmicha.warpmail.net>
To: Robert Dailey <rcdailey.lists@gmail.com>, Git <git@vger.kernel.org>
Subject: Re: diff <commit> using 3-dot behavior
Date: Wed, 24 Aug 2016 18:00:11 +0200	[thread overview]
Message-ID: <9efbdfbb-4c82-1355-1f89-5edca7135179@drmicha.warpmail.net> (raw)
In-Reply-To: <CAHd499DL2WiTgnk5A--qihUh-jF9m7aXDzHAQuW=bLRVW4Bniw@mail.gmail.com>

Robert Dailey venit, vidit, dixit 24.08.2016 16:28:
> I want to view the complete diff of my branch (topic) relative to its
> parent branch (master). This should include cached/staged files and
> unstaged working tree changes.
> 
> If I do this:
> 
> $ git diff master
> 
> This will include changes on master *since* my last merge, which I do
> not want (I don't want to see changes on master, only on topic). I
> tried this:
> 
> $ git diff master --not master
> 
> This didn't give me any output. If I do this:
> 
> $ git diff master...topic
> 
> This shows me only committed changes on topic, but excludes staged &
> unstaged changes.
> 
> How can I get the results I want?

The 3-dot notation means:

Show the difference between the merge-base of master and topic, and topic.

I'm not completely sure, but I guess what you want is:

Show the difference between the merge-base of master and topic, and the
worktree.

You can accomplish this with:

git diff $(git merge-base master topic)

I guess a shorter notation for that could come in handy. OTOH, I usually
diff against HEAD in a situation like that.

Cheers,
Michael

  reply	other threads:[~2016-08-24 16:00 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-24 14:28 diff <commit> using 3-dot behavior Robert Dailey
2016-08-24 16:00 ` Michael J Gruber [this message]
2016-08-24 16:10   ` Robert Dailey
2016-08-24 16:22 ` Junio C Hamano
2016-08-24 20:48   ` Jacob Keller
2016-08-24 21:39     ` Jeff King

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=9efbdfbb-4c82-1355-1f89-5edca7135179@drmicha.warpmail.net \
    --to=git@drmicha.warpmail.net \
    --cc=git@vger.kernel.org \
    --cc=rcdailey.lists@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).