mirror of
https://github.com/git/git
synced 2024-08-24 18:26:02 +00:00
Merge branch 'jk/p5303-sed-portability-fix'
A perf script was made more portable. * jk/p5303-sed-portability-fix: p5303: avoid sed GNU-ism
This commit is contained in:
commit
4cc0e8794d
|
@ -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 |
|
||||
|
|
Loading…
Reference in a new issue