Commit e0e55b50ec1b9458bbd145dc18635a8a8265d4db

Stefan Sperling 2019-02-01T22:46:32

Support tags in Linux git repo which do not carry name of tagger.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
diff --git a/lib/object_parse.c b/lib/object_parse.c
index c7a5cc2..330cbe4 100644
--- a/lib/object_parse.c
+++ b/lib/object_parse.c
@@ -857,8 +857,12 @@ got_object_parse_tag(struct got_tag_object **tag, uint8_t *buf, size_t len)
 			goto done;
 		}
 	} else {
-		err = got_error(GOT_ERR_BAD_OBJ_DATA);
-		goto done;
+		/* Some old tags in the Linux git repo have no tagger. */
+		(*tag)->tagger = strdup("");
+		if ((*tag)->tagger == NULL) {
+			err = got_error_from_errno();
+			goto done;
+		}
 	}
 
 	(*tag)->tagmsg = strndup(s, remain);