Code

git-add --intent-to-add (-N)
[git.git] / t / t7004-tag.sh
index bc7ce2cbbb712f890245688da03be96146a1d9ed..198244c57d0adb7c7e6c698ff098ac19055d3d21 100755 (executable)
@@ -625,7 +625,7 @@ esac
 # Name and email: C O Mitter <committer@example.com>
 # No password given, to enable non-interactive operation.
 
-cp -R ../t7004 ./gpghome
+cp -R "$TEST_DIRECTORY"/t7004 ./gpghome
 chmod 0700 gpghome
 GNUPGHOME="$(pwd)/gpghome"
 export GNUPGHOME
@@ -1070,4 +1070,24 @@ test_expect_success \
        test_cmp expect actual
 '
 
+test_expect_success 'filename for the message is relative to cwd' '
+       mkdir subdir &&
+       echo "Tag message in top directory" >msgfile-5 &&
+       echo "Tag message in sub directory" >subdir/msgfile-5 &&
+       (
+               cd subdir &&
+               git tag -a -F msgfile-5 tag-from-subdir
+       ) &&
+       git cat-file tag tag-from-subdir | grep "in sub directory"
+'
+
+test_expect_success 'filename for the message is relative to cwd' '
+       echo "Tag message in sub directory" >subdir/msgfile-6 &&
+       (
+               cd subdir &&
+               git tag -a -F msgfile-6 tag-from-subdir-2
+       ) &&
+       git cat-file tag tag-from-subdir-2 | grep "in sub directory"
+'
+
 test_done