git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Q: "git diff" using tag names

From
Jakub Narebski <jnareb@gmail.com>
Date
Oct 28, 2011, 13:21 UTC
Message-ID
<m3aa8l5k1y.fsf@localhost.localdomain>
In-Reply-To
<4EAABC15020000A100007D9D@gwsmtp1.uni-regensburg.de>
"Ulrich Windl" <Ulrich.Windl@rz.uni-regensburg.de> writes:
> When using a somewhat older git (of SLES11 SP1 SDK),
Nb. you can check version of git with "git --version".
Show 8 quoted lines
>                                                      I could not
> find a way to "git diff" between two tag names; I can only diff
> between two commit numbers. I can display a changeset using "git
> show", but that's not what I wanted.
>
> Is it possible to get the diff I want using older versions, and is
> such a feature implemented in the current version? If so, since
> when?

From the very beginning in Git you can use tag name where you need commit identifier; Git would use commit that tag points to (will dereference or peel a tag).

That is not possible in some [censored] version control systems; I am looking at you, Subversion!

So if you can do
  $ git show v0.9
  $ git show v1.0
you can also do
  $ git diff v0.9 v1.0
and
  $ git log v0.9..v1.0
-- 
Jakub Narębski
Previous: Alexey ShumkinNext: Ulrich Windl
Message 9 of 10 in “Q: "git diff" using tag names”
  1. Ulrich WindlOct 28, 2011
  2. Alexey ShumkinOct 28, 2011
  3. Antw: Re: Q: "git diff" using tag namesUlrich Windl, Nov 2, 2011
  4. Alexey ShumkinNov 2, 2011
  5. Frans KlaverNov 2, 2011
  6. Alexey ShumkinNov 2, 2011
  7. Junio C HamanoNov 2, 2011
  8. Alexey ShumkinNov 2, 2011
  9. Jakub NarebskiOct 28, 2011
  10. Antw: Re: Q: "git diff" using tag namesUlrich Windl, Nov 2, 2011

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.