transport-helper: pass --signed-tags=warn-strip to fast-export
[gitweb.git] / commit.c
index 94029c949653693a78fd2ecfb15d98cbebd517c9..888e02ae2f65ab566555465e5d88d02bbe52420f 100644 (file)
--- a/commit.c
+++ b/commit.c
@@ -841,7 +841,7 @@ struct commit_list *get_merge_bases(struct commit *one, struct commit *two,
 }
 
 /*
- * Is "commit" a decendant of one of the elements on the "with_commit" list?
+ * Is "commit" a descendant of one of the elements on the "with_commit" list?
  */
 int is_descendant_of(struct commit *commit, struct commit_list *with_commit)
 {
@@ -1047,6 +1047,8 @@ static struct {
 } sigcheck_gpg_status[] = {
        { 'G', "\n[GNUPG:] GOODSIG " },
        { 'B', "\n[GNUPG:] BADSIG " },
+       { 'U', "\n[GNUPG:] TRUST_NEVER" },
+       { 'U', "\n[GNUPG:] TRUST_UNDEFINED" },
 };
 
 static void parse_gpg_output(struct signature_check *sigc)
@@ -1068,11 +1070,13 @@ static void parse_gpg_output(struct signature_check *sigc)
                        found += strlen(sigcheck_gpg_status[i].check);
                }
                sigc->result = sigcheck_gpg_status[i].result;
-               sigc->key = xmemdupz(found, 16);
-               found += 17;
-               next = strchrnul(found, '\n');
-               sigc->signer = xmemdupz(found, next - found);
-               break;
+               /* The trust messages are not followed by key/signer information */
+               if (sigc->result != 'U') {
+                       sigc->key = xmemdupz(found, 16);
+                       found += 17;
+                       next = strchrnul(found, '\n');
+                       sigc->signer = xmemdupz(found, next - found);
+               }
        }
 }