summaryrefslogtreecommitdiff
path: root/rev-tree.c
diff options
context:
space:
mode:
authorLibravatar Linus Torvalds <torvalds@ppc970.osdl.org>2005-04-11 17:40:58 -0700
committerLibravatar Linus Torvalds <torvalds@ppc970.osdl.org>2005-04-11 17:40:58 -0700
commit771364af0ebc34ba968590eeebf0b78ee148f0a5 (patch)
tree5b140cab879595232bb13fe3007cdb14ed267db6 /rev-tree.c
parentMake "rev-tree" capable of showing the difference in reachability between two (diff)
downloadtgif-771364af0ebc34ba968590eeebf0b78ee148f0a5.tar.xz
Make the rev-tree output more regular. This is the last
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).
Diffstat (limited to 'rev-tree.c')
-rw-r--r--rev-tree.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/rev-tree.c b/rev-tree.c
index c10f4ee295..7669c5ed18 100644
--- a/rev-tree.c
+++ b/rev-tree.c
@@ -236,10 +236,10 @@ int main(int argc, char **argv)
if (!interesting(rev))
continue;
- printf("%x %s", marked(rev), sha1_to_hex(rev->sha1));
+ printf("%s:%d", sha1_to_hex(rev->sha1), marked(rev));
p = rev->parent;
while (p) {
- printf(" %s", sha1_to_hex(p->parent->sha1));
+ printf(" %s:%d", sha1_to_hex(p->parent->sha1), marked(p->parent));
p = p->next;
}
printf("\n");