summaryrefslogtreecommitdiff
path: root/rev-tree.c
Commit message (Collapse)AuthorAgeFilesLines
* Use common "revision.h" header for both fsck and rev-tree.Linus Torvalds2005-04-131-92/+6
| | | | | | | | It's really a very generic thing: the notion of one sha1 revision referring to another one. "fsck" uses it for all nodes, and "rev-tree" only tracks commit-node relationships, but the code was already the same - now we just make that explicit by moving it to a common header file.
* [PATCH] Consolidate the error handlingPetr Baudis2005-04-131-1/+1
| | | | | | | Now there is error() for "library" errors and die() for fatal "application" errors. usage() is now used strictly only for usage errors. Signed-off-by: Petr Baudis <pasky@ucw.cz>
* [PATCH] Fix a crash when doing rev-treePetr Baudis2005-04-121-6/+6
| | | | | | | In parse_commit(), free(buffer) is fed a bogus pointer. Signed-off-by: Petr Baudis <pasky@ucw.cz> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* Make "rev-tree" able to read its own output again from the cache.Linus Torvalds2005-04-121-7/+74
| | | | | | | | | | Also, add "date" information to the output so that you can do something like this: rev-tree `cat .git/HEAD` | sort -nr | cut -d' ' -f2 | while read i; do cat-file commit $i; done which basically becomes a "git log" (aka "git changes") where things are sorted by time.
* [PATCH] rev-tree support for "in X but not in Y".David Woodhouse2005-04-121-0/+8
| | | | | | | | | | | | | | | | To do the automated commit-mailing I need to be able to answer the question "which commits are here today but weren't yesterday"... i.e. given two commit-ids $HEAD and $YESTERDAY I want to be able to do: rev-tree $HEAD ^$YESTERDAY to list those commits which are in the tree now but weren't ancestors of yesterday's head. Yes, I could probably do this with rev-tree $HEAD $YESTERDAY | egrep -v ^[a-z0-9]*:3 but I prefer not to.
* Make the rev-tree output more regular. This is the lastLinus Torvalds2005-04-111-2/+2
| | | | | | | | | | | | change. Promise. It now always outputs all the revisions as <sha1>:<reachability>, where the reachability is the bitmask of how that revision was reachable from the commits in the argument list. Trivially, if there is only one commit, the reachability will always be (1 << 0) == 1 for all reachable revisions, and there won't be any edges (so the "--edges" flag only makes sense with multiple commit keys).
* Make "rev-tree" capable of showing the difference in reachability between twoLinus Torvalds2005-04-111-13/+99
| | | | | | | or more commit points. This is important both to know what the difference between two commit points is, but also to figure out where to try to merge from.
* Make "rev-tree" more efficient and more useful.Linus Torvalds2005-04-111-44/+68
| | | | | | | Slight change of output format: it now lists all parents on the same line. This allows it to work on initial commits too (which have no parents), and also makes the output format a lot more intuitive.
* Add a "rev-tree" helper, which calculates the revisionLinus Torvalds2005-04-111-0/+138
tree graph. It's quite fast when the commit-objects are cached, but since it has to walk every single commit-object, it also allows you to cache an old state and just add on top of that.