diff options
author | Junio C Hamano <gitster@pobox.com> | 2013-06-02 16:00:44 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2013-06-02 16:00:44 -0700 |
commit | ed73fe56428eecd2b635473f6a517a183c4713a3 (patch) | |
tree | 42b21a016eca79cfee341a1bc0dbf5118acdb01e /t/perf | |
parent | Merge branch 'mc/describe-first-parent' (diff) | |
parent | git-log(1): remove --full-line-diff description (diff) | |
download | tgif-ed73fe56428eecd2b635473f6a517a183c4713a3.tar.xz |
Merge branch 'tr/line-log'
* tr/line-log:
git-log(1): remove --full-line-diff description
line-log: fix documentation formatting
log -L: improve comments in process_all_files()
log -L: store the path instead of a diff_filespec
log -L: test merge of parallel modify/rename
t4211: pass -M to 'git log -M -L...' test
log -L: fix overlapping input ranges
log -L: check range set invariants when we look it up
Speed up log -L... -M
log -L: :pattern:file syntax to find by funcname
Implement line-history search (git log -L)
Export rewrite_parents() for 'log -L'
Refactor parse_loc
Diffstat (limited to 't/perf')
-rwxr-xr-x | t/perf/p4211-line-log.sh | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/t/perf/p4211-line-log.sh b/t/perf/p4211-line-log.sh new file mode 100755 index 0000000000..3d074b0e41 --- /dev/null +++ b/t/perf/p4211-line-log.sh @@ -0,0 +1,34 @@ +#!/bin/sh + +test_description='Tests log -L performance' +. ./perf-lib.sh + +test_perf_default_repo + +# Pick a file to log pseudo-randomly. The sort key is the blob hash, +# so it is stable. +test_expect_success 'select a file' ' + git ls-tree HEAD | grep ^100644 | + sort -k 3 | head -1 | cut -f 2 >filelist +' + +file=$(cat filelist) +export file + +test_perf 'git rev-list --topo-order (baseline)' ' + git rev-list --topo-order HEAD >/dev/null +' + +test_perf 'git log --follow (baseline for -M)' ' + git log --oneline --follow -- "$file" >/dev/null +' + +test_perf 'git log -L' ' + git log -L 1:"$file" >/dev/null +' + +test_perf 'git log -M -L' ' + git log -M -L 1:"$file" >/dev/null +' + +test_done |