Re: [PATCH 2/3] tutorial: expanded discussion of commit history
- From
Junio C Hamano <junkio@cox.net>
- Date
- May 22, 2006, 08:45 UTC
- Message-ID
- <7vzmhacuso.fsf@assigned-by-dhcp.cox.net>
- In-Reply-To
- <e4rsef$v34$1@sea.gmane.org>
Jakub Narebski <jnareb@gmail.com> writes:
Show 12 quoted lines
> J. Bruce Fields wrote: > >> +Finally, most commands that take filenames will optionally allow you >> +to precede any filename by a commit, to specify a particular version >> +fo the file: >> + >> +------------------------------------- >> +$ git diff v2.5:Makefile HEAD:Makefile.in >> +------------------------------------- > > Why not mention also :<stage>:<filename>, or would <stage> be not defined in > this place of tutorial?
I do not think being able to do diff with arbitrary stage is often used in practice. By definition, you would want to do diff with a stage during a conflicted merge, and most of the time the default combined diff without any colon form should give you the most useful results. Also, ":<path>" to mean the entry in the index is often equivalent to "git diff --cached".
IOW, these are obscure special purpose notation, and I do not think tutorial is a good place to cover them.