aboutsummaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2017-03-27 10:59:26 -0700
committerJunio C Hamano <gitster@pobox.com>2017-03-27 10:59:26 -0700
commita026bde1ac84f90f0b82faa18890b2023c5198d5 (patch)
tree8e976b861d4b23904c09bb1fbdd8004f37cb6e6f /t
parent09fb53568e3e00e30891b118045aa07ede524103 (diff)
parent3b754eedd58636926d07b14a34799a3aa7b8ebc2 (diff)
downloadgit-a026bde1ac84f90f0b82faa18890b2023c5198d5.tar.gz
git-a026bde1ac84f90f0b82faa18890b2023c5198d5.tar.xz
Merge branch 'jk/prefix-filename'
Code clean-up with minor bugfixes. * jk/prefix-filename: bundle: use prefix_filename with bundle path prefix_filename: simplify windows #ifdef prefix_filename: return newly allocated string prefix_filename: drop length parameter prefix_filename: move docstring to header file hash-object: fix buffer reuse with --path in a subdirectory
Diffstat (limited to 't')
-rwxr-xr-xt/t1007-hash-object.sh10
1 files changed, 10 insertions, 0 deletions
diff --git a/t/t1007-hash-object.sh b/t/t1007-hash-object.sh
index c5245c5cb..532682f51 100755
--- a/t/t1007-hash-object.sh
+++ b/t/t1007-hash-object.sh
@@ -134,6 +134,16 @@ test_expect_success 'gitattributes also work in a subdirectory' '
)
'
+test_expect_success '--path works in a subdirectory' '
+ (
+ cd subdir &&
+ path1_sha=$(git hash-object --path=../file1 ../file0) &&
+ path0_sha=$(git hash-object --path=../file0 ../file1) &&
+ test "$file0_sha" = "$path0_sha" &&
+ test "$file1_sha" = "$path1_sha"
+ )
+'
+
test_expect_success 'check that --no-filters option works' '
nofilters_file1=$(git hash-object --no-filters file1) &&
test "$file0_sha" = "$nofilters_file1" &&