" --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;
static char pretty_header[16384];
pretty_print_commit(commit_format, commit->buffer, ~0, pretty_header, sizeof(pretty_header));
printf("%s%c", pretty_header, hdr_termination);
- }
+ }
+ fflush(stdout);
}
static int filter_commit(struct commit * commit)
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))
if (object->type == tree_type) {
struct tree *tree = (struct tree *)object;
if (!tree_objects)
- die("%s is a tree object, not a commit", name);
+ return NULL;
if (flags & UNINTERESTING) {
mark_tree_uninteresting(tree);
return NULL;
if (object->type == blob_type) {
struct blob *blob = (struct blob *)object;
if (!blob_objects)
- die("%s is a blob object, not a commit", name);
+ return NULL;
if (flags & UNINTERESTING) {
mark_blob_uninteresting(blob);
return NULL;
blob_objects = 1;
continue;
}
+ if (!strcmp(arg, "--unpacked")) {
+ unpacked = 1;
+ limited = 1;
+ continue;
+ }
if (!strncmp(arg, "--merge-order", 13)) {
merge_order = 1;
continue;