X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=builtin%2Fshow-ref.c;h=be9b512eebc72984e6ff4cdd4859ab7951539e19;hb=4ef927a995d9b54b37e4cff8ed7cd92764d4dacd;hp=0b2a9ad1a9a8a825c2e2104f8a9f729a9cb03d1a;hpb=53b304224a561b5fd4ae35cedc0a978d91d4b1da;p=git.git diff --git a/builtin/show-ref.c b/builtin/show-ref.c index 0b2a9ad1a..45f0340c3 100644 --- a/builtin/show-ref.c +++ b/builtin/show-ref.c @@ -120,7 +120,7 @@ static int add_existing(const char *refname, const unsigned char *sha1, int flag */ static int exclude_existing(const char *match) { - static struct string_list existing_refs = { NULL, 0, 0, 0 }; + static struct string_list existing_refs = STRING_LIST_INIT_NODUP; char buf[1024]; int matchlen = match ? strlen(match) : 0; @@ -193,7 +193,8 @@ static const struct option show_ref_options[] = { "only show SHA1 hash using digits", PARSE_OPT_OPTARG, &hash_callback }, OPT__ABBREV(&abbrev), - OPT__QUIET(&quiet), + OPT__QUIET(&quiet, + "do not print results to stdout (useful with --verify)"), { OPTION_CALLBACK, 0, "exclude-existing", &exclude_existing_arg, "pattern", "show refs from stdin that aren't in local repository", PARSE_OPT_OPTARG | PARSE_OPT_NONEG, exclude_existing_callback },