Skip to content

Commit 94ba44a

Browse files
authored
Merge branch 'git:master' into master
2 parents 9ed6419 + cc01bad commit 94ba44a

File tree

1,354 files changed

+56126
-21330
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,354 files changed

+56126
-21330
lines changed

.cirrus.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ freebsd_task:
99
DEFAULT_TEST_TARGET: prove
1010
DEVELOPER: 1
1111
freebsd_instance:
12-
image_family: freebsd-13-2
12+
image_family: freebsd-13-4
1313
memory: 2G
1414
install_script:
1515
pkg install -y gettext gmake perl5

.clang-format

Lines changed: 51 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@ AlignConsecutiveAssignments: false
3232
# double b = 3.14;
3333
AlignConsecutiveDeclarations: false
3434

35+
# Align consecutive macro definitions.
36+
AlignConsecutiveMacros: true
37+
3538
# Align escaped newlines as far left as possible
3639
# #define A \
3740
# int aaaa; \
@@ -72,6 +75,10 @@ AlwaysBreakAfterReturnType: None
7275
BinPackArguments: true
7376
BinPackParameters: true
7477

78+
# Add no space around the bit field
79+
# unsigned bf:2;
80+
BitFieldColonSpacing: None
81+
7582
# Attach braces to surrounding context except break before braces on function
7683
# definitions.
7784
# void foo()
@@ -96,6 +103,14 @@ BreakStringLiterals: false
96103
# Switch statement body is always indented one level more than case labels.
97104
IndentCaseLabels: false
98105

106+
# Indents directives before the hash. Each level uses a single space for
107+
# indentation.
108+
# #if FOO
109+
# # include <foo>
110+
# #endif
111+
IndentPPDirectives: AfterHash
112+
PPIndentWidth: 1
113+
99114
# Don't indent a function definition or declaration if it is wrapped after the
100115
# type
101116
IndentWrappedFunctionNames: false
@@ -108,11 +123,18 @@ PointerAlignment: Right
108123
# x = (int32)y; not x = (int32) y;
109124
SpaceAfterCStyleCast: false
110125

126+
# No space is inserted after the logical not operator
127+
SpaceAfterLogicalNot: false
128+
111129
# Insert spaces before and after assignment operators
112130
# int a = 5; not int a=5;
113131
# a += 42; a+=42;
114132
SpaceBeforeAssignmentOperators: true
115133

134+
# Spaces will be removed before case colon.
135+
# case 1: break; not case 1 : break;
136+
SpaceBeforeCaseColon: false
137+
116138
# Put a space before opening parentheses only after control statement keywords.
117139
# void f() {
118140
# if (true) {
@@ -124,6 +146,14 @@ SpaceBeforeParens: ControlStatements
124146
# Don't insert spaces inside empty '()'
125147
SpaceInEmptyParentheses: false
126148

149+
# No space before first '[' in arrays
150+
# int a[5][5]; not int a [5][5];
151+
SpaceBeforeSquareBrackets: false
152+
153+
# No space will be inserted into {}
154+
# while (true) {} not while (true) { }
155+
SpaceInEmptyBlock: false
156+
127157
# The number of spaces before trailing line comments (// - comments).
128158
# This does not affect trailing block comments (/* - comments).
129159
SpacesBeforeTrailingComments: 1
@@ -149,20 +179,30 @@ Cpp11BracedListStyle: false
149179

150180
# A list of macros that should be interpreted as foreach loops instead of as
151181
# function calls. Taken from:
152-
# git grep -h '^#define [^[:space:]]*for_each[^[:space:]]*(' \
153-
# | sed "s,^#define \([^[:space:]]*for_each[^[:space:]]*\)(.*$, - '\1'," \
154-
# | sort | uniq
182+
# git grep -h '^#define [^[:space:]]*for_\?each[^[:space:]]*(' |
183+
# sed "s/^#define / - '/; s/(.*$/'/" | sort | uniq
155184
ForEachMacros:
156-
- 'for_each_abbrev'
157185
- 'for_each_builtin'
158186
- 'for_each_string_list_item'
159187
- 'for_each_ut'
160188
- 'for_each_wanted_builtin'
189+
- 'hashmap_for_each_entry'
190+
- 'hashmap_for_each_entry_from'
191+
- 'kh_foreach'
192+
- 'kh_foreach_value'
161193
- 'list_for_each'
162194
- 'list_for_each_dir'
163195
- 'list_for_each_prev'
164196
- 'list_for_each_prev_safe'
165197
- 'list_for_each_safe'
198+
- 'strintmap_for_each_entry'
199+
- 'strmap_for_each_entry'
200+
- 'strset_for_each_entry'
201+
202+
# A list of macros that should be interpreted as conditionals instead of as
203+
# function calls.
204+
IfMacros:
205+
- 'if_test'
166206

167207
# The maximum number of consecutive empty lines to keep.
168208
MaxEmptyLinesToKeep: 1
@@ -172,13 +212,14 @@ KeepEmptyLinesAtTheStartOfBlocks: false
172212

173213
# Penalties
174214
# This decides what order things should be done if a line is too long
175-
PenaltyBreakAssignment: 10
176-
PenaltyBreakBeforeFirstCallParameter: 30
177-
PenaltyBreakComment: 10
215+
PenaltyBreakAssignment: 5
216+
PenaltyBreakBeforeFirstCallParameter: 5
217+
PenaltyBreakComment: 5
178218
PenaltyBreakFirstLessLess: 0
179-
PenaltyBreakString: 10
180-
PenaltyExcessCharacter: 100
181-
PenaltyReturnTypeOnItsOwnLine: 60
219+
PenaltyBreakOpenParenthesis: 300
220+
PenaltyBreakString: 5
221+
PenaltyExcessCharacter: 10
222+
PenaltyReturnTypeOnItsOwnLine: 300
182223

183224
# Don't sort #include's
184225
SortIncludes: false

.github/workflows/check-style.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: check-style
2+
3+
# Get the repository with all commits to ensure that we can analyze
4+
# all of the commits contributed via the Pull Request.
5+
6+
on:
7+
pull_request:
8+
types: [opened, synchronize]
9+
10+
# Avoid unnecessary builds. Unlike the main CI jobs, these are not
11+
# ci-configurable (but could be).
12+
concurrency:
13+
group: ${{ github.workflow }}-${{ github.ref }}
14+
cancel-in-progress: true
15+
16+
jobs:
17+
check-style:
18+
env:
19+
CC: clang
20+
jobname: ClangFormat
21+
runs-on: ubuntu-latest
22+
steps:
23+
- uses: actions/checkout@v4
24+
with:
25+
fetch-depth: 0
26+
27+
- run: ci/install-dependencies.sh
28+
29+
- name: git clang-format
30+
continue-on-error: true
31+
id: check_out
32+
run: |
33+
./ci/run-style-check.sh \
34+
"${{github.event.pull_request.base.sha}}"

.github/workflows/main.yml

Lines changed: 21 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -113,13 +113,15 @@ jobs:
113113
cancel-in-progress: ${{ needs.ci-config.outputs.skip_concurrent == 'yes' }}
114114
steps:
115115
- uses: actions/checkout@v4
116-
- uses: git-for-windows/setup-git-for-windows-sdk@v1
116+
- name: setup SDK
117+
shell: powershell
118+
run: ci/install-sdk.ps1
117119
- name: build
118-
shell: bash
120+
shell: powershell
119121
env:
120122
HOME: ${{runner.workspace}}
121123
NO_PERL: 1
122-
run: . /etc/profile && ci/make-test-artifacts.sh artifacts
124+
run: git-sdk/usr/bin/bash.exe -l -c 'ci/make-test-artifacts.sh artifacts'
123125
- name: zip up tracked files
124126
run: git archive -o artifacts/tracked.tar.gz HEAD
125127
- name: upload tracked files and build artifacts
@@ -147,10 +149,12 @@ jobs:
147149
- name: extract tracked files and build artifacts
148150
shell: bash
149151
run: tar xf artifacts.tar.gz && tar xf tracked.tar.gz
150-
- uses: git-for-windows/setup-git-for-windows-sdk@v1
152+
- name: setup SDK
153+
shell: powershell
154+
run: ci/install-sdk.ps1
151155
- name: test
152-
shell: bash
153-
run: . /etc/profile && ci/run-test-slice.sh ${{matrix.nr}} 10
156+
shell: powershell
157+
run: git-sdk/usr/bin/bash.exe -l -c 'ci/run-test-slice.sh ${{matrix.nr}} 10'
154158
- name: print test failures
155159
if: failure() && env.FAILED_TEST_ARTIFACTS != ''
156160
shell: bash
@@ -181,16 +185,12 @@ jobs:
181185
repository: 'microsoft/vcpkg'
182186
path: 'compat/vcbuild/vcpkg'
183187
- name: download vcpkg artifacts
184-
shell: powershell
185-
run: |
186-
$urlbase = "https://dev.azure.com/git/git/_apis/build/builds"
187-
$id = ((Invoke-WebRequest -UseBasicParsing "${urlbase}?definitions=9&statusFilter=completed&resultFilter=succeeded&`$top=1").content | ConvertFrom-JSON).value[0].id
188-
$downloadUrl = ((Invoke-WebRequest -UseBasicParsing "${urlbase}/$id/artifacts").content | ConvertFrom-JSON).value[0].resource.downloadUrl
189-
(New-Object Net.WebClient).DownloadFile($downloadUrl, "compat.zip")
190-
Expand-Archive compat.zip -DestinationPath . -Force
191-
Remove-Item compat.zip
188+
uses: git-for-windows/get-azure-pipelines-artifact@v0
189+
with:
190+
repository: git/git
191+
definitionId: 9
192192
- name: add msbuild to PATH
193-
uses: microsoft/setup-msbuild@v1
193+
uses: microsoft/setup-msbuild@v2
194194
- name: copy dlls to root
195195
shell: cmd
196196
run: compat\vcbuild\vcpkg_copy_dlls.bat release
@@ -343,8 +343,8 @@ jobs:
343343
image: alpine
344344
distro: alpine-latest
345345
- jobname: linux32
346-
image: daald/ubuntu32:xenial
347-
distro: ubuntu32-16.04
346+
image: i386/ubuntu:focal
347+
distro: ubuntu32-20.04
348348
- jobname: pedantic
349349
image: fedora
350350
distro: fedora-latest
@@ -354,27 +354,21 @@ jobs:
354354
runs-on: ubuntu-latest
355355
container: ${{matrix.vector.image}}
356356
steps:
357-
- uses: actions/checkout@v4
358-
if: matrix.vector.jobname != 'linux32'
359-
- uses: actions/checkout@v1 # cannot be upgraded because Node.js Actions aren't supported in this container
357+
- name: prepare libc6 for actions
360358
if: matrix.vector.jobname == 'linux32'
359+
run: apt -q update && apt -q -y install libc6-amd64 lib64stdc++6
360+
- uses: actions/checkout@v4
361361
- run: ci/install-dependencies.sh
362362
- run: ci/run-build-and-tests.sh
363363
- name: print test failures
364364
if: failure() && env.FAILED_TEST_ARTIFACTS != ''
365365
run: ci/print-test-failures.sh
366366
- name: Upload failed tests' directories
367-
if: failure() && env.FAILED_TEST_ARTIFACTS != '' && matrix.vector.jobname != 'linux32'
367+
if: failure() && env.FAILED_TEST_ARTIFACTS != ''
368368
uses: actions/upload-artifact@v4
369369
with:
370370
name: failed-tests-${{matrix.vector.jobname}}
371371
path: ${{env.FAILED_TEST_ARTIFACTS}}
372-
- name: Upload failed tests' directories
373-
if: failure() && env.FAILED_TEST_ARTIFACTS != '' && matrix.vector.jobname == 'linux32'
374-
uses: actions/upload-artifact@v1 # cannot be upgraded because Node.js Actions aren't supported in this container
375-
with:
376-
name: failed-tests-${{matrix.vector.jobname}}
377-
path: ${{env.FAILED_TEST_ARTIFACTS}}
378372
static-analysis:
379373
needs: ci-config
380374
if: needs.ci-config.outputs.enabled == 'yes'

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
/GIT-PYTHON-VARS
1010
/GIT-SCRIPT-DEFINES
1111
/GIT-SPATCH-DEFINES
12+
/GIT-TEST-SUITES
1213
/GIT-USER-AGENT
1314
/GIT-VERSION-FILE
1415
/bin-wrappers/
@@ -126,6 +127,7 @@
126127
/git-rebase
127128
/git-receive-pack
128129
/git-reflog
130+
/git-refs
129131
/git-remote
130132
/git-remote-http
131133
/git-remote-https

0 commit comments

Comments
 (0)