summaryrefslogtreecommitdiff
path: root/revision.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@osdl.org>2006-02-27 08:54:36 -0800
committerJunio C Hamano <junkio@cox.net>2006-02-27 11:10:16 -0800
commitd9a83684c473e04c61f0060c4926d20f8183f7b6 (patch)
tree09cfb3bda4137a5376477fc6659e933fa4657cf4 /revision.c
parentd9cfb964c7a59a39711da12e56563e10aa388331 (diff)
downloadgit-d9a83684c473e04c61f0060c4926d20f8183f7b6.tar.gz
Splitting rev-list into revisions lib, end of beginning.
This makes the rewrite easier to validate in that revision flag parsing and warlking part are now all in rev_info structure. Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'revision.c')
-rw-r--r--revision.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/revision.c b/revision.c
index d61410bc59..67ff4de2d1 100644
--- a/revision.c
+++ b/revision.c
@@ -143,8 +143,10 @@ static struct commit *get_commit_reference(struct rev_info *revs, const char *na
object->flags |= flags;
if (parse_commit(commit) < 0)
die("unable to parse commit %s", name);
- if (flags & UNINTERESTING)
+ if (flags & UNINTERESTING) {
mark_parents_uninteresting(commit);
+ revs->limited = 1;
+ }
return commit;
}
@@ -255,10 +257,12 @@ int setup_revisions(int argc, const char **argv, struct rev_info *revs)
}
if (!strncmp(arg, "--max-age=", 10)) {
revs->max_age = atoi(arg + 10);
+ revs->limited = 1;
continue;
}
if (!strncmp(arg, "--min-age=", 10)) {
revs->min_age = atoi(arg + 10);
+ revs->limited = 1;
continue;
}
if (!strcmp(arg, "--all")) {
@@ -277,11 +281,13 @@ int setup_revisions(int argc, const char **argv, struct rev_info *revs)
}
if (!strcmp(arg, "--topo-order")) {
revs->topo_order = 1;
+ revs->limited = 1;
continue;
}
if (!strcmp(arg, "--date-order")) {
revs->lifo = 0;
revs->topo_order = 1;
+ revs->limited = 1;
continue;
}
if (!strcmp(arg, "--dense")) {
@@ -309,6 +315,11 @@ int setup_revisions(int argc, const char **argv, struct rev_info *revs)
revs->edge_hint = 1;
continue;
}
+ if (!strcmp(arg, "--unpacked")) {
+ revs->unpacked = 1;
+ revs->limited = 1;
+ continue;
+ }
*unrecognized++ = arg;
left++;
continue;
@@ -365,6 +376,8 @@ int setup_revisions(int argc, const char **argv, struct rev_info *revs)
commit = get_commit_reference(revs, def, sha1, 0);
add_one_commit(commit, revs);
}
+ if (revs->paths)
+ revs->limited = 1;
*unrecognized = NULL;
return left;
}