commit - ea6d9f6be5d893cad015b27d61ad22542eeb5d3d
commit + 2417344cc53b6a209f122d9506f0f6070110e5db
blob - 091fe9123294f540ecb4a1c819466a02c8b3d9fa
blob + 7f0160eb84167c81651a77e41063ae514649d020
--- got/got.c
+++ got/got.c
free(id);
if (err)
break;
+ printf("from: %s\n", got_object_tag_get_tagger(tag));
+ tagger_time = got_object_tag_get_tagger_time(tag);
+ datestr = get_datestr(&tagger_time, datebuf);
+ if (datestr)
+ printf("date: %s UTC\n", datestr);
err = got_object_id_str(&id_str,
got_object_tag_get_object_id(tag));
if (err)
break;
switch (got_object_tag_get_object_type(tag)) {
case GOT_OBJ_TYPE_BLOB:
- printf("%s: %s\n", GOT_OBJ_LABEL_BLOB, id_str);
+ printf("object: %s %s\n", GOT_OBJ_LABEL_BLOB, id_str);
break;
case GOT_OBJ_TYPE_TREE:
- printf("%s: %s\n", GOT_OBJ_LABEL_TREE, id_str);
+ printf("object: %s %s\n", GOT_OBJ_LABEL_TREE, id_str);
break;
case GOT_OBJ_TYPE_COMMIT:
- printf("%s: %s\n", GOT_OBJ_LABEL_COMMIT, id_str);
+ printf("object: %s %s\n", GOT_OBJ_LABEL_COMMIT, id_str);
break;
case GOT_OBJ_TYPE_TAG:
- printf("%s: %s\n", GOT_OBJ_LABEL_TAG, id_str);
+ printf("object: %s %s\n", GOT_OBJ_LABEL_TAG, id_str);
break;
default:
break;
}
free(id_str);
- printf("from: %s\n", got_object_tag_get_tagger(tag));
- tagger_time = got_object_tag_get_tagger_time(tag);
- datestr = get_datestr(&tagger_time, datebuf);
- if (datestr)
- printf("date: %s UTC\n", datestr);
tagmsg0 = strdup(got_object_tag_get_message(tag));
got_object_tag_close(tag);
if (tagmsg0 == NULL) {
blob - 6662a98218eebcf905b65f59bd0e7274cd2df8b8
blob + 053f3a29b6cd31b95acc625485dd7f1450fe46fb
--- regress/cmdline/tag.sh
+++ regress/cmdline/tag.sh
echo "-----------------------------------------------" \
> $testroot/stdout.expected
echo "tag $tag $tag_id" >> $testroot/stdout.expected
- echo "commit: $commit_id" >> $testroot/stdout.expected
echo "from: $GOT_AUTHOR" >> $testroot/stdout.expected
echo "date: $d1" >> $testroot/stdout.expected
+ echo "object: commit $commit_id" >> $testroot/stdout.expected
echo " " >> $testroot/stdout.expected
echo " test" >> $testroot/stdout.expected
echo " " >> $testroot/stdout.expected
echo "-----------------------------------------------" \
>> $testroot/stdout.expected
echo "tag $tag2 $tag_id2" >> $testroot/stdout.expected
- echo "commit: $commit_id" >> $testroot/stdout.expected
echo "from: $GOT_AUTHOR" >> $testroot/stdout.expected
echo "date: $d2" >> $testroot/stdout.expected
+ echo "object: commit $commit_id" >> $testroot/stdout.expected
echo " " >> $testroot/stdout.expected
echo " test" >> $testroot/stdout.expected
echo " " >> $testroot/stdout.expected