diff options
author | Junio C Hamano <gitster@pobox.com> | 2017-03-27 19:59:26 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-03-27 19:59:26 +0200 |
commit | a026bde1ac84f90f0b82faa18890b2023c5198d5 (patch) | |
tree | 8e976b861d4b23904c09bb1fbdd8004f37cb6e6f /t | |
parent | Merge branch 'jc/lint-runaway-here-doc' (diff) | |
parent | bundle: use prefix_filename with bundle path (diff) | |
download | git-a026bde1ac84f90f0b82faa18890b2023c5198d5.tar.xz git-a026bde1ac84f90f0b82faa18890b2023c5198d5.zip |
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-x | t/t1007-hash-object.sh | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/t/t1007-hash-object.sh b/t/t1007-hash-object.sh index c5245c5cb4..532682f51c 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" && |