Code

Remove exec bit from builtin-fast-export.c
[git.git] / builtin-tag.c
index 95ecfdbab650f3b60bb3ecb7e20f68a913470d20..129ff57f11d2cdfdacc6be9685736ada07caef7f 100644 (file)
@@ -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;
 }