summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: c0fb976)
raw | patch | inline | side by side (parent: c0fb976)
author | David Woodhouse <dwmw2@infradead.org> | |
Tue, 12 Apr 2005 19:35:11 +0000 (12:35 -0700) | ||
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | |
Tue, 12 Apr 2005 19:35:11 +0000 (12:35 -0700) |
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.
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.
rev-tree.c | patch | blob | history |
diff --git a/rev-tree.c b/rev-tree.c
index 7669c5ed18239d9306a77dac3ecebc36f4e1adcd..21598d61703f4c1520c243aa1eb92d0f8c1197d3 100644 (file)
--- a/rev-tree.c
+++ b/rev-tree.c
#define SEEN 0x10000
static int show_edges = 0;
+static int basemask = 0;
struct parent {
struct revision *parent;
}
return 0;
}
+ if (mask & basemask)
+ return 0;
+
return 1;
}
continue;
}
+ if (arg[0] == '^') {
+ arg++;
+ basemask |= 1<<nr;
+ }
if (nr >= MAX_COMMITS || get_sha1_hex(arg, sha1[nr]))
usage("rev-tree [--edges] [--cache <cache-file>] <commit-id> [<commit-id>]");
parse_commit(sha1[nr]);