Commit Diff


commit - 575e82180aa41c12a56f88f1c9dd01d1bac56424
commit + d4fc9a6260fe59ce46d184c584e4cdfea36d5944
blob - fb06a64586c4f9bafcf38831a0e04a269ea93f35 (mode 755)
blob + 4b2f3a902b8496a2eb71b6e31a24779e249cd2c1 (mode 744)
--- regress/cmdline/ref.sh
+++ regress/cmdline/ref.sh
@@ -20,7 +20,16 @@ function test_ref_create {
 	local testroot=`test_init ref_create`
 	local commit_id=`git_show_head $testroot/repo`
 
-	# Create a head ref based on repository's HEAD reference
+	# Create a ref based on a commit ID
+	got ref -r $testroot/repo refs/heads/commitref $commit_id
+	ret="$?"
+	if [ "$ret" != "0" ]; then
+		echo "got ref command failed unexpectedly"
+		test_done "$testroot" "$ret"
+		return 1
+	fi
+
+	# Create a ref based on repository's HEAD reference
 	got ref -r $testroot/repo refs/heads/newref HEAD
 	ret="$?"
 	if [ "$ret" != "0" ]; then
@@ -103,6 +112,7 @@ function test_ref_create {
 	cat $testroot/wt/.got/uuid | tr -d '\n' >> $testroot/stdout.expected
 	echo ": $commit_id" >> $testroot/stdout.expected
 	echo "refs/heads/anotherref: $commit_id" >> $testroot/stdout.expected
+	echo "refs/heads/commitref: $commit_id" >> $testroot/stdout.expected
 	echo "refs/heads/master: $commit_id" >> $testroot/stdout.expected
 	echo "refs/heads/newref: $commit_id" >> $testroot/stdout.expected
 	echo "refs/heads/symbolicref: refs/heads/master" \