Skip to content

Commit 771364a

Browse files
author
Linus Torvalds
committed
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).
1 parent 28258af commit 771364a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

rev-tree.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -236,10 +236,10 @@ int main(int argc, char **argv)
236236
if (!interesting(rev))
237237
continue;
238238

239-
printf("%x %s", marked(rev), sha1_to_hex(rev->sha1));
239+
printf("%s:%d", sha1_to_hex(rev->sha1), marked(rev));
240240
p = rev->parent;
241241
while (p) {
242-
printf(" %s", sha1_to_hex(p->parent->sha1));
242+
printf(" %s:%d", sha1_to_hex(p->parent->sha1), marked(p->parent));
243243
p = p->next;
244244
}
245245
printf("\n");

0 commit comments

Comments
 (0)