X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=builtin-name-rev.c;h=f153da012f4e89ff8744ede70911cd4690de79b2;hb=2b2828b452bd8b3258de75451f77362decb1dffe;hp=384da4db13d9ff82b9bd45e6ab26b5dbf925dc22;hpb=179c94b24ae87e28328f9b311489417b66bd62c9;p=git.git diff --git a/builtin-name-rev.c b/builtin-name-rev.c index 384da4db1..f153da012 100644 --- a/builtin-name-rev.c +++ b/builtin-name-rev.c @@ -195,7 +195,7 @@ int cmd_name_rev(int argc, const char **argv, const char *prefix) OPT_END(), }; - git_config(git_default_config); + git_config(git_default_config, NULL); argc = parse_options(argc, argv, opts, name_rev_usage, 0); if (!!all + !!transform_stdin + !!argc > 1) { error("Specify either a list, or --all, not both!"); @@ -280,9 +280,13 @@ int cmd_name_rev(int argc, const char **argv, const char *prefix) int i, max; max = get_max_object_index(); - for (i = 0; i < max; i++) - show_name(get_indexed_object(i), NULL, + for (i = 0; i < max; i++) { + struct object *obj = get_indexed_object(i); + if (!obj) + continue; + show_name(obj, NULL, always, allow_undefined, data.name_only); + } } else { int i; for (i = 0; i < revs.nr; i++)