Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/t/perf
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2021-02-06 03:40:45 +0300
committerJunio C Hamano <gitster@pobox.com>2021-02-06 03:40:45 +0300
commit4cc0e8794d7e36044d3ae0abc692b5d8958f5d41 (patch)
tree107f132cdfa541bc34b8b6057445acb1df7879ea /t/perf
parent77db59c2f91de69d5b204b88422d01b2632bcecd (diff)
parentf08b6c553d5b0e5a50176a176ad9061130fb9b4b (diff)
Merge branch 'jk/p5303-sed-portability-fix'
A perf script was made more portable. * jk/p5303-sed-portability-fix: p5303: avoid sed GNU-ism
Diffstat (limited to 't/perf')
-rwxr-xr-xt/perf/p5303-many-packs.sh12
1 files changed, 8 insertions, 4 deletions
diff --git a/t/perf/p5303-many-packs.sh b/t/perf/p5303-many-packs.sh
index f4c2ab0584..ce0c42cc9f 100755
--- a/t/perf/p5303-many-packs.sh
+++ b/t/perf/p5303-many-packs.sh
@@ -21,10 +21,14 @@ repack_into_n () {
mkdir staging &&
git rev-list --first-parent HEAD |
- sed -n '1~5p' |
- head -n "$1" |
- perl -e 'print reverse <>' \
- >pushes
+ perl -e '
+ my $n = shift;
+ while (<>) {
+ last unless @commits < $n;
+ push @commits, $_ if $. % 5 == 1;
+ }
+ print reverse @commits;
+ ' "$1" >pushes
# create base packfile
head -n 1 pushes |