By the way "diff d8a60" also works (unless d8a60 is merge commit, in
which case you would need "diff -c d8a60" or "diff -m d8a60").
By the way, git has the following extended SHA1 syntax for <commit-ish>
(documented in git-rev-parse(1)):
* full SHA1 (40-chars hexadecimal string) or abbreviation unique for
repository
* symbolic ref name. E.g. 'master' typically means commit object referenced
by $GIT_DIR/refs/heads/master; 'v1.4.1' means commit object referenced
[indirectly] by $GIT_DIR/refs/tags/v1.4.1. You can say 'heads/master'
and 'tags/master' if you have both head (branch) and tag named 'master',
but don't do that. HEAD means current branch (and is usually default).
* <ref>@{<date>} or <ref>@{<n>} to specify value of <ref> (usually branch)
at given point of time, or n changes to ref back. Available only if you
have reflog for given ref.
* <commit-ish>^<n> means n-th parent of given revision. <commit-ish>^0
means commit itself. <commit-ish>^ is a shortcut for <commit-ish>^1.
<commit-ish>~<n> is shortcut for <commit-ish>^^..^ with n*'^', for
example rev~3 is equivalent to rev^^^, which in turn is equivalent
to rev^1^1^1
Additionally it has following undocumented extended SHA1 syntax to refer
to trees (directories) and blobs (file contents)
* <revision>:<filename> gives SHA1 of tree or blob at given revision
* :<stage>:<filename> (I think for blobs only) gives SHA1 for different
versions of file during unresolved merge conflict.
I'm not enumerating here all the ways to specify part of DAG of history,
except that it includes "A ^B" meaning "all from A", "exclude all from B",
"B..A" meaning "^B A", "A...B" meaning "A B --not $(git merge-base A B)",
and of course "A -- path" meaning "all from A", "limit to changes in path".
What about _your_ SMC? ;-)
--
Jakub Narebski
Poland
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html