git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Robert P. J. Day" <rpjday@crashcourse.ca>
To: Git Mailing list <git@vger.kernel.org>
Subject: how does one interpret "git diff <commit> ^<commit>"
Date: Fri, 22 Feb 2019 08:22:12 -0500 (EST)	[thread overview]
Message-ID: <alpine.LFD.2.21.1902220816010.6353@localhost.localdomain> (raw)


  was perusing the git FAQ and ran across this:

  How do I obtain a list of files which have changed in a given commit?

     $ git diff --name-only <commit>^!


after playing with "git rev-parse", i figured out that the above was
equivalent to (using kernel "v4.19" tag as an example):

$ git diff v4.19 ^v4.19^
diff --git a/Makefile b/Makefile
index bf3786e4ffec..69fa5c0310d8 100644
--- a/Makefile
+++ b/Makefile
@@ -2,8 +2,8 @@
 VERSION = 4
 PATCHLEVEL = 19
 SUBLEVEL = 0
-EXTRAVERSION = -rc8
-NAME = Merciless Moray
+EXTRAVERSION =
+NAME = "People's Front"

 # *DOCUMENTATION*
 # To see a list of typical targets execute "make help"
$

  but i get exactly the same output if i reverse the arguments:

$ git diff ^v4.19^ v4.19
diff --git a/Makefile b/Makefile
index bf3786e4ffec..69fa5c0310d8 100644
--- a/Makefile
+++ b/Makefile
@@ -2,8 +2,8 @@
 VERSION = 4
 PATCHLEVEL = 19
 SUBLEVEL = 0
-EXTRAVERSION = -rc8
-NAME = Merciless Moray
+EXTRAVERSION =
+NAME = "People's Front"

 # *DOCUMENTATION*
 # To see a list of typical targets execute "make help"

  so i'm confused as to how to "git diff" interprets and processes
those two arguments, as "v4.19" is, of course, a reference to a
specific commit, but "^v4.19^" appears to define all those commits not
reachable from "v4.19^". how should one read this?

rday

-- 

========================================================================
Robert P. J. Day                                 Ottawa, Ontario, CANADA
                  http://crashcourse.ca/dokuwiki

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================

             reply	other threads:[~2019-02-22 13:22 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-22 13:22 Robert P. J. Day [this message]
2019-02-22 14:04 ` how does one interpret "git diff <commit> ^<commit>" Ævar Arnfjörð Bjarmason
2019-02-22 15:30 ` 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=alpine.LFD.2.21.1902220816010.6353@localhost.localdomain \
    --to=rpjday@crashcourse.ca \
    --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).