diff --git a/revision.c b/revision.c
index ebe3e93d1298c542ae655e3af3b5b2761f0061de..0a0ef3ce5bb9a030b774dc68fc9c60533732a364 100644
--- a/revision.c
+++ b/revision.c
@@ -300,9 +300,8 @@ static struct commit *handle_commit(struct rev_info *revs,
 		/*
 		 * We'll handle the tagged object by looping or dropping
 		 * through to the non-tag handlers below. Do not
-		 * propagate data from the tag's pending entry.
+		 * propagate path data from the tag's pending entry.
 		 */
-		name = "";
 		path = NULL;
 		mode = 0;
 	}
diff --git a/t/t4202-log.sh b/t/t4202-log.sh
index 99ab7ca21f2673e646232d9c07f77c8ed2f5f998..043c48e2992ab8ad3f4fc6c58961b078b307f53a 100755
--- a/t/t4202-log.sh
+++ b/t/t4202-log.sh
@@ -872,4 +872,33 @@ test_expect_success GPG 'log --graph --show-signature for merged tag' '
 	grep "^| | gpg: Good signature" actual
 '
 
+test_expect_success 'set up --source tests' '
+	git checkout --orphan source-a &&
+	test_commit one &&
+	test_commit two &&
+	git checkout -b source-b HEAD^ &&
+	test_commit three
+'
+
+test_expect_success 'log --source paints branch names' '
+	cat >expect <<-\EOF &&
+	09e12a9	source-b three
+	8e393e1	source-a two
+	1ac6c77	source-b one
+	EOF
+	git log --oneline --source source-a source-b >actual &&
+	test_cmp expect actual
+'
+
+test_expect_success 'log --source paints tag names' '
+	git tag -m tagged source-tag &&
+	cat >expect <<-\EOF &&
+	09e12a9	source-tag three
+	8e393e1	source-a two
+	1ac6c77	source-tag one
+	EOF
+	git log --oneline --source source-tag source-a >actual &&
+	test_cmp expect actual
+'
+
 test_done