commit->buffer = NULL;
}
-static void finish_object(struct object_array_entry *p, void *data)
+static void finish_object(struct object *obj, const struct name_path *path, const char *name)
{
- if (p->item->type == OBJ_BLOB && !has_sha1_file(p->item->sha1))
- die("missing blob object '%s'", sha1_to_hex(p->item->sha1));
+ if (obj->type == OBJ_BLOB && !has_sha1_file(obj->sha1))
+ die("missing blob object '%s'", sha1_to_hex(obj->sha1));
}
-static void show_object(struct object_array_entry *p, void *data)
+static void show_object(struct object *obj, const struct name_path *path, const char *component)
{
+ char *name = path_name(path, component);
/* An object with name "foo\n0000000..." can be used to
* confuse downstream "git pack-objects" very badly.
*/
- const char *ep = strchr(p->name, '\n');
+ const char *ep = strchr(name, '\n');
- finish_object(p, data);
+ finish_object(obj, path, name);
if (ep) {
- printf("%s %.*s\n", sha1_to_hex(p->item->sha1),
- (int) (ep - p->name),
- p->name);
+ printf("%s %.*s\n", sha1_to_hex(obj->sha1),
+ (int) (ep - name),
+ name);
}
else
- printf("%s %s\n", sha1_to_hex(p->item->sha1), p->name);
+ printf("%s %s\n", sha1_to_hex(obj->sha1), name);
+ free(name);
}
static void show_edge(struct commit *commit)
printf(stringed ? "' &&\n" : "'\n");
}
-int show_bisect_vars(struct rev_list_info *info, int reaches, int all,
- int flags)
+int show_bisect_vars(struct rev_list_info *info, int reaches, int all)
{
- int cnt;
+ int cnt, flags = info->bisect_show_flags;
char hex[41] = "", *format;
struct commit_list *tried;
struct rev_info *revs = info->revs;
int bisect_list = 0;
int bisect_show_vars = 0;
int bisect_find_all = 0;
- int bisect_show_all = 0;
int quiet = 0;
git_config(git_default_config, NULL);
if (!strcmp(arg, "--bisect-all")) {
bisect_list = 1;
bisect_find_all = 1;
- bisect_show_all = 1;
+ info.bisect_show_flags = BISECT_SHOW_ALL;
revs.show_decorations = 1;
continue;
}
bisect_find_all);
if (bisect_show_vars)
- return show_bisect_vars(&info, reaches, all,
- bisect_show_all ? BISECT_SHOW_ALL : 0);
+ return show_bisect_vars(&info, reaches, all);
}
traverse_commit_list(&revs,