diff options
author | Junio C Hamano <gitster@pobox.com> | 2017-04-26 06:39:07 (GMT) |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-04-26 06:39:07 (GMT) |
commit | 6cbc478d83b5773d1925869e50bf6067306f4817 (patch) | |
tree | d90bac61cb05a2138f38da2f92c13b09a56af70a /t/t0065-strcmp-offset.sh | |
parent | 864033a3833d6d0f90bf5a2bd1128b295c1041a7 (diff) | |
parent | b986df5c35a930858c6bba5f66c18ce6760d84e9 (diff) | |
download | git-6cbc478d83b5773d1925869e50bf6067306f4817.zip git-6cbc478d83b5773d1925869e50bf6067306f4817.tar.gz git-6cbc478d83b5773d1925869e50bf6067306f4817.tar.bz2 |
Merge branch 'jh/add-index-entry-optim'
"git checkout" that handles a lot of paths has been optimized by
reducing the number of unnecessary checks of paths in the
has_dir_name() function.
* jh/add-index-entry-optim:
read-cache: speed up has_dir_name (part 2)
read-cache: speed up has_dir_name (part 1)
read-cache: speed up add_index_entry during checkout
p0006-read-tree-checkout: perf test to time read-tree
read-cache: add strcmp_offset function
Diffstat (limited to 't/t0065-strcmp-offset.sh')
-rwxr-xr-x | t/t0065-strcmp-offset.sh | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/t/t0065-strcmp-offset.sh b/t/t0065-strcmp-offset.sh new file mode 100755 index 0000000..7d6d214 --- /dev/null +++ b/t/t0065-strcmp-offset.sh @@ -0,0 +1,21 @@ +#!/bin/sh + +test_description='Test strcmp_offset functionality' + +. ./test-lib.sh + +while read s1 s2 expect +do + test_expect_success "strcmp_offset($s1, $s2)" ' + echo "$expect" >expect && + test-strcmp-offset "$s1" "$s2" >actual && + test_cmp expect actual + ' +done <<-EOF +abc abc 0 3 +abc def -1 0 +abc abz -1 2 +abc abcdef -1 3 +EOF + +test_done |