Skip to content

Commit

Permalink
"git rev-list --unpacked" shows only unpacked commits
Browse files Browse the repository at this point in the history
More infrastructure to do efficient incremental packs.
  • Loading branch information
Linus Torvalds committed Jul 3, 2005
1 parent eb01937 commit 12d2a18
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions rev-list.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,14 @@ static const char rev_list_usage[] =
" --max-count=nr\n"
" --max-age=epoch\n"
" --min-age=epoch\n"
" --bisect\n"
" --objects\n"
" --unpacked\n"
" --header\n"
" --pretty\n"
" --merge-order [ --show-breaks ]";

static int unpacked = 0;
static int bisect_list = 0;
static int tag_objects = 0;
static int tree_objects = 0;
Expand Down Expand Up @@ -318,6 +322,8 @@ static struct commit_list *limit_list(struct commit_list *list)
struct commit *commit = pop_most_recent_commit(&list, SEEN);
struct object *obj = &commit->object;

if (unpacked && has_sha1_pack(obj->sha1))
obj->flags |= UNINTERESTING;
if (obj->flags & UNINTERESTING) {
mark_parents_uninteresting(commit);
if (everybody_uninteresting(list))
Expand Down Expand Up @@ -450,6 +456,11 @@ int main(int argc, char **argv)
blob_objects = 1;
continue;
}
if (!strcmp(arg, "--unpacked")) {
unpacked = 1;
limited = 1;
continue;
}
if (!strncmp(arg, "--merge-order", 13)) {
merge_order = 1;
continue;
Expand Down

0 comments on commit 12d2a18

Please sign in to comment.