"git rev-list --unpacked" shows only unpacked commits
More infrastructure to do efficient incremental packs.
This commit is contained in:
parent
eb019375ab
commit
12d2a18780
11
rev-list.c
11
rev-list.c
@ -15,10 +15,14 @@ static const char rev_list_usage[] =
|
|||||||
" --max-count=nr\n"
|
" --max-count=nr\n"
|
||||||
" --max-age=epoch\n"
|
" --max-age=epoch\n"
|
||||||
" --min-age=epoch\n"
|
" --min-age=epoch\n"
|
||||||
|
" --bisect\n"
|
||||||
|
" --objects\n"
|
||||||
|
" --unpacked\n"
|
||||||
" --header\n"
|
" --header\n"
|
||||||
" --pretty\n"
|
" --pretty\n"
|
||||||
" --merge-order [ --show-breaks ]";
|
" --merge-order [ --show-breaks ]";
|
||||||
|
|
||||||
|
static int unpacked = 0;
|
||||||
static int bisect_list = 0;
|
static int bisect_list = 0;
|
||||||
static int tag_objects = 0;
|
static int tag_objects = 0;
|
||||||
static int tree_objects = 0;
|
static int tree_objects = 0;
|
||||||
@ -318,6 +322,8 @@ static struct commit_list *limit_list(struct commit_list *list)
|
|||||||
struct commit *commit = pop_most_recent_commit(&list, SEEN);
|
struct commit *commit = pop_most_recent_commit(&list, SEEN);
|
||||||
struct object *obj = &commit->object;
|
struct object *obj = &commit->object;
|
||||||
|
|
||||||
|
if (unpacked && has_sha1_pack(obj->sha1))
|
||||||
|
obj->flags |= UNINTERESTING;
|
||||||
if (obj->flags & UNINTERESTING) {
|
if (obj->flags & UNINTERESTING) {
|
||||||
mark_parents_uninteresting(commit);
|
mark_parents_uninteresting(commit);
|
||||||
if (everybody_uninteresting(list))
|
if (everybody_uninteresting(list))
|
||||||
@ -450,6 +456,11 @@ int main(int argc, char **argv)
|
|||||||
blob_objects = 1;
|
blob_objects = 1;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
if (!strcmp(arg, "--unpacked")) {
|
||||||
|
unpacked = 1;
|
||||||
|
limited = 1;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
if (!strncmp(arg, "--merge-order", 13)) {
|
if (!strncmp(arg, "--merge-order", 13)) {
|
||||||
merge_order = 1;
|
merge_order = 1;
|
||||||
continue;
|
continue;
|
||||||
|
Loading…
Reference in New Issue
Block a user