aboutsummaryrefslogtreecommitdiff
path: root/rev-parse.c
Commit message (Collapse)AuthorAge
* Add "--flags" and "--no-flags" arguments to git-rev-parseLinus Torvalds2005-07-06
| | | | | The scripts that use this (notably "git diff") will want to split up flags and file arguments.
* git-rev-parse: support show sha1 names for pack entriesLinus Torvalds2005-07-03
| | | | | | | | | | This is actually subtly wrong. If a short match is found in the object directory, but would _also_ match another SHA1 ID in a pack (or it shows in one pack but not another), we'll never have done the pack lookup, and we think it's unique. I can't find it in myself to care. You really want to use enough of a SHA1 that there is never any ambiguity.
* Make git-rev-parse support cogito-style "short hex names"Linus Torvalds2005-07-03
| | | | | Currently only for unpacked objects, but the infrastructure is there to do it for packed objects too.
* Add "--all" flag to rev-parse that shows all refsLinus Torvalds2005-07-03
| | | | | And make git-rev-list just silently ignore non-commit refs if we're not asking for all objects.
* git-rev-parse: add "--not" flag to mark subsequent heads negativeLinus Torvalds2005-06-26
| | | | | | | | | | | | If you have two lists of heads, and you want to see ones reachable from list $a but not from list $b, just do git-rev-list $(git-rev-parse $a --not $b) which is useful for both bisecting (where "b" would be the list of known good revisions, and "a" would be the latest found bad head) and for just seeing what the difference between two sets of heads are if you want to generate a pack-file for the difference.
* git-rev-parse: re-organize and be more carefulLinus Torvalds2005-06-24
| | | | | | | Output default revisions as their hex SHA1 names to be consistent. Add "--verify" flag that verifies that we output a single ref and not more (and disables ref arguments).
* Change parent syntax to "xyz^" instead of "xyz.p"Linus Torvalds2005-06-20
| | | | | | 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.
* Make rev-parse understand "extended sha1" syntaxLinus Torvalds2005-06-20
| | | | | | | | | 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).
* git-rev-parse: flush "default" head when encountering something unexpectedLinus Torvalds2005-06-20
| | | | | The unexpected thing is likely a pathname, we need the default for that too.
* git-rev-parse: parse ".." before simple SHA1'sLinus Torvalds2005-06-20
| | | | | This fixes "<hexsha1>..*", since get_sha1() will happily ignore any garbage at the end and thus we never got to the ".." check before.
* Teach git-rev-parse about revision-specifying argumentsLinus Torvalds2005-06-13
| | | | Things like "--max-count=xxx" are "rev-only".
* git-rev-parse: split "revs" and "non-revs"Linus Torvalds2005-06-13
| | | | | | 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.
* Add 'git-rev-parse' helper scriptLinus Torvalds2005-06-13
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.