Commit Graph

7 Commits

Author SHA1 Message Date
Linus Torvalds
218e441daf Change parent syntax to "xyz^" instead of "xyz.p"
The ".pN" thing might be a common ending of a tag, and in
contrast, ^ already is a special character for revisions
so use that instead.
2005-06-20 21:06:47 -07:00
Linus Torvalds
a8be83fe00 Make rev-parse understand "extended sha1" syntax
You can say "HEAD.p" for the "parent of HEAD". It nests, so

	HEAD.p2.p

means parent of second parent of HEAD (which obviously depends
on HEAD being a merge).
2005-06-20 20:28:09 -07:00
Linus Torvalds
9d73fad4ca git-rev-parse: flush "default" head when encountering something unexpected
The unexpected thing is likely a pathname, we need the default for that
too.
2005-06-20 16:14:13 -07:00
Linus Torvalds
800644c5cb git-rev-parse: parse ".." before simple SHA1's
This fixes "<hexsha1>..*", since get_sha1() will happily ignore any
garbage at the end and thus we never got to the ".." check before.
2005-06-20 08:29:13 -07:00
Linus Torvalds
921d865ea2 Teach git-rev-parse about revision-specifying arguments
Things like "--max-count=xxx" are "rev-only".
2005-06-13 11:14:20 -07:00
Linus Torvalds
8ebb018402 git-rev-parse: split "revs" and "non-revs"
Sometimes we only want to output revisions, and sometimes we want to
only see the stuff that wasn't revisions.  Teach git-rev-parse to
understand the "--revs-only" and "--no-revs" flags.
2005-06-13 10:21:11 -07:00
Linus Torvalds
178cb24338 Add 'git-rev-parse' helper script
It's an incredibly cheesy helper that changes human-readable revision
arguments into the git-rev-list argument format.

You can use it to do something like this:

	git-rev-list --pretty $(git-rev-parse --default HEAD "$@")

which is what git-log-script will become. Here git-rev-parse will
then allow you to use arguments like "v2.6.12-rc5.." or similar
human-readable ranges.

It's really quite stupid: "a..b" will be converted into "a" and "^b" if
"a" and "b" are valid object pointers.  And the "--default" case will be
used if nothing but flags have been seen, so that you can default to a
certain argument if there are no other ranges.
2005-06-13 10:06:50 -07:00