X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=builtin-tag.c;h=e675206de38f0709b4c07e1667d791bf9b6704cb;hb=3e4a1ba07b65506c36f7f40fa76fcee26c400a5c;hp=9a59caf70d74cae9b7eae858402233ad6f7c3984;hpb=fc99469a2b786676ffe48d5966d71cea3613b716;p=git.git diff --git a/builtin-tag.c b/builtin-tag.c index 9a59caf70..e675206de 100644 --- a/builtin-tag.c +++ b/builtin-tag.c @@ -16,7 +16,7 @@ static const char * const git_tag_usage[] = { "git-tag [-a|-s|-u ] [-f] [-m |-F ] []", "git-tag -d ...", - "git-tag -l [-n []] []", + "git-tag -l [-n[]] []", "git-tag -v ...", NULL }; @@ -230,19 +230,17 @@ static int do_sign(struct strbuf *buffer) if (write_in_full(gpg.in, buffer->buf, buffer->len) != buffer->len) { close(gpg.in); + close(gpg.out); finish_command(&gpg); return error("gpg did not accept the tag data"); } close(gpg.in); - gpg.close_in = 0; len = strbuf_read(buffer, gpg.out, 1024); + close(gpg.out); if (finish_command(&gpg) || !len || len < 0) return error("gpg failed to sign the tag"); - if (len < 0) - return error("could not read the entire signature from gpg."); - return 0; } @@ -258,7 +256,7 @@ static void set_signingkey(const char *value) die("signing key value too long (%.10s...)", value); } -static int git_tag_config(const char *var, const char *value) +static int git_tag_config(const char *var, const char *value, void *cb) { if (!strcmp(var, "user.signingkey")) { if (!value) @@ -267,7 +265,7 @@ static int git_tag_config(const char *var, const char *value) return 0; } - return git_default_config(var, value); + return git_default_config(var, value, cb); } static void write_tag_body(int fd, const unsigned char *sha1) @@ -410,7 +408,7 @@ int cmd_tag(int argc, const char **argv, const char *prefix) OPT_END() }; - git_config(git_tag_config); + git_config(git_tag_config, NULL); argc = parse_options(argc, argv, options, git_tag_usage, 0);