Signed-off-by: Sebastian Götte <ja...@physik-pool.tu-berlin.de>
---
 commit.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/commit.c b/commit.c
index 1aeb17a..533727c 100644
--- a/commit.c
+++ b/commit.c
@@ -1027,8 +1027,8 @@ static struct {
        char result;
        const char *check;
 } signature_check[] = {
-       { 'G', "\n[GNUPG:] GOODSIG " },
-       { 'B', "\n[GNUPG:] BADSIG " },
+       { 'G', "[GNUPG:] GOODSIG " },
+       { 'B', "[GNUPG:] BADSIG " },
 };
 
 static void parse_signature_lines(struct signature *sig)
@@ -1041,6 +1041,9 @@ static void parse_signature_lines(struct signature *sig)
                const char *next;
                if (!found)
                        continue;
+               if (found != buf) 
+                       if (found[-1] != '\n')
+                               continue;
                sig->check_result = signature_check[i].result;
                found += strlen(signature_check[i].check);
                sig->key = xmemdupz(found, 16);
-- 
1.8.1.5

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to