Commit Diff


commit - 09867e481449ff3ca17bfc7132da42e839319511
commit + 5a8ddf14e9ac671de9ff4a7c79cbe33ea15141a1
blob - 9b8b3d3b4ca6b8a9fc2e2edc10f2165f8b745964
blob + 470a29d176ecfa541bd5c52a8eb0dc9a03b004fc
--- regress/cmdline/log.sh
+++ regress/cmdline/log.sh
@@ -114,6 +114,7 @@ function test_log_tag {
 	local testroot=`test_init log_tag`
 	local commit_id=`git_show_head $testroot/repo`
 	local tag="1.0.0"
+	local tag2="2.0.0"
 
 	got checkout $testroot/repo $testroot/wt > /dev/null
 	ret="$?"
@@ -131,7 +132,22 @@ function test_log_tag {
 	ret="$?"
 	if [ "$ret" != "0" ]; then
 		diff -u $testroot/stdout.expected $testroot/stdout
+		test_done "$testroot" "$ret"
+		return 1
 	fi
+
+	# test a "leightweight" tag
+	(cd $testroot/repo && git tag $tag2)
+
+	echo "commit $commit_id (master, tags/$tag, tags/$tag2)" \
+		> $testroot/stdout.expected
+	(cd $testroot/wt && got log -l1 -c $tag2 | grep ^commit \
+		> $testroot/stdout)
+	cmp -s $testroot/stdout.expected $testroot/stdout
+	ret="$?"
+	if [ "$ret" != "0" ]; then
+		diff -u $testroot/stdout.expected $testroot/stdout
+	fi
 	test_done "$testroot" "$ret"
 }