summaryrefslogtreecommitdiff
path: root/revision.c
diff options
context:
space:
mode:
authorJan Harkes <jaharkes@cs.cmu.edu>2006-10-31 01:37:49 (GMT)
committerJunio C Hamano <junkio@cox.net>2006-10-31 01:47:36 (GMT)
commit744f498522d2255cf0ce967298c3d87b4727d1a4 (patch)
tree92cd4a71743b113b6b7fbeefeefbc9d1aa48634d /revision.c
parent173a9cbe7031bc3574b3f41cb2d2375cf959ff2a (diff)
downloadgit-744f498522d2255cf0ce967298c3d87b4727d1a4.zip
git-744f498522d2255cf0ce967298c3d87b4727d1a4.tar.gz
git-744f498522d2255cf0ce967298c3d87b4727d1a4.tar.bz2
Continue traversal when rev-list --unpacked finds a packed commit.
When getting the list of all unpacked objects by walking the commit history, we would stop traversal whenever we hit a packed commit. However the fact that we found a packed commit does not guarantee that all previous commits are also packed. As a result the commit walkers did not show all reachable unpacked objects. Signed-off-by: Jan Harkes <jaharkes@cs.cmu.edu> Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'revision.c')
-rw-r--r--revision.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/revision.c b/revision.c
index 93f2513..89e6c6f 100644
--- a/revision.c
+++ b/revision.c
@@ -418,9 +418,6 @@ static void limit_list(struct rev_info *revs)
if (revs->max_age != -1 && (commit->date < revs->max_age))
obj->flags |= UNINTERESTING;
- if (revs->unpacked &&
- has_sha1_pack(obj->sha1, revs->ignore_packed))
- obj->flags |= UNINTERESTING;
add_parents_to_list(revs, commit, &list);
if (obj->flags & UNINTERESTING) {
mark_parents_uninteresting(commit);
@@ -1142,17 +1139,18 @@ struct commit *get_revision(struct rev_info *revs)
* that we'd otherwise have done in limit_list().
*/
if (!revs->limited) {
- if ((revs->unpacked &&
- has_sha1_pack(commit->object.sha1,
- revs->ignore_packed)) ||
- (revs->max_age != -1 &&
- (commit->date < revs->max_age)))
+ if (revs->max_age != -1 &&
+ (commit->date < revs->max_age))
continue;
add_parents_to_list(revs, commit, &revs->commits);
}
if (commit->object.flags & SHOWN)
continue;
+ if (revs->unpacked && has_sha1_pack(commit->object.sha1,
+ revs->ignore_packed))
+ continue;
+
/* We want to show boundary commits only when their
* children are shown. When path-limiter is in effect,
* rewrite_parents() drops some commits from getting shown,