Antw: Re: Q: "git diff" using tag names

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>>> Jakub Narebski <jnareb@xxxxxxxxx> schrieb am 28.10.2011 um 15:21 in Nachricht
<m3aa8l5k1y.fsf@localhost.localdomain>:
> "Ulrich Windl" <Ulrich.Windl@xxxxxxxxxxxxxxxxxxxx> writes:
> 
> > When using a somewhat older git (of SLES11 SP1 SDK),
> 
> Nb. you can check version of git with "git --version".

Hi!

For the records, it's "1.6.0.2"...

> 
> >                                                      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).

As said before, I was confused by the simplicity: I was looking for an option to specify revisions (as opposed to file names), like "-r" for RCS, but found none. To make things complicated, I had mistyped one tag name without noticing, so I failed to diff, making me think that tag names won't work the way they actually do.

Sorry, and thanks to everybody who helped!

Ulrich

> 
> 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



 

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]