Skip to content

Commit 972c9cf

Browse files
committed
Merge branch 'master' of github.com:git/git
* 'master' of github.com:git/git: (397 commits) Git 2.33-rc0 The seventh batch ci/install-dependencies: handle "sparse" job package installs ci: run "apt-get update" before "apt-get install" cache-tree: prefetch in partial clone read-tree unpack-trees: refactor prefetching code pack-bitmap: check pack validity when opening bitmap bundle tests: use test_cmp instead of grep bundle tests: use ">file" not ": >file" The sixth batch doc: pull: fix rebase=false documentation pack-bitmap: clarify comment in filter_bitmap_exclude_type() doc: clarify description of 'submodule.recurse' doc/git-config: simplify "override" advice for FILES section doc/git-config: clarify GIT_CONFIG environment variable doc/git-config: explain --file instead of referring to GIT_CONFIG t0000: fix test if run with TEST_OUTPUT_DIRECTORY multi-pack-index: fix potential segfault without sub-command refs/debug: quote prefix t0000: clear GIT_SKIP_TESTS before running sub-tests ...
2 parents ae4e099 + 6626245 commit 972c9cf

File tree

394 files changed

+9347
-9973
lines changed

Some content is hidden

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

394 files changed

+9347
-9973
lines changed

.github/workflows/check-whitespace.yml

Lines changed: 2 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,9 @@ jobs:
1212
check-whitespace:
1313
runs-on: ubuntu-latest
1414
steps:
15-
- name: Set commit count
16-
shell: bash
17-
run: echo "COMMIT_DEPTH=$((1+$COMMITS))" >>$GITHUB_ENV
18-
env:
19-
COMMITS: ${{ github.event.pull_request.commits }}
20-
2115
- uses: actions/checkout@v2
2216
with:
23-
fetch-depth: ${{ env.COMMIT_DEPTH }}
17+
fetch-depth: 0
2418

2519
- name: git log --check
2620
id: check_out
@@ -47,25 +41,9 @@ jobs:
4741
echo "${dash} ${etc}"
4842
;;
4943
esac
50-
done <<< $(git log --check --pretty=format:"---% h% s" -${{github.event.pull_request.commits}})
44+
done <<< $(git log --check --pretty=format:"---% h% s" ${{github.event.pull_request.base.sha}}..)
5145
5246
if test -n "${log}"
5347
then
54-
echo "::set-output name=checkout::"${log}""
5548
exit 2
5649
fi
57-
58-
- name: Add Check Output as Comment
59-
uses: actions/github-script@v3
60-
id: add-comment
61-
env:
62-
log: ${{ steps.check_out.outputs.checkout }}
63-
with:
64-
script: |
65-
await github.issues.createComment({
66-
issue_number: context.issue.number,
67-
owner: context.repo.owner,
68-
repo: context.repo.repo,
69-
body: `Whitespace errors found in workflow ${{ github.workflow }}:\n\n\`\`\`\n${process.env.log.replace(/\\n/g, "\n")}\n\`\`\``
70-
})
71-
if: ${{ failure() }}

.github/workflows/main.yml

Lines changed: 66 additions & 111 deletions
Original file line numberDiff line numberDiff line change
@@ -81,44 +81,21 @@ jobs:
8181
if: needs.ci-config.outputs.enabled == 'yes'
8282
runs-on: windows-latest
8383
steps:
84-
- uses: actions/checkout@v1
85-
- name: download git-sdk-64-minimal
86-
shell: bash
87-
run: |
88-
## Get artifact
89-
urlbase=https://dev.azure.com/git-for-windows/git/_apis/build/builds
90-
id=$(curl "$urlbase?definitions=22&statusFilter=completed&resultFilter=succeeded&\$top=1" |
91-
jq -r ".value[] | .id")
92-
download_url="$(curl "$urlbase/$id/artifacts" |
93-
jq -r '.value[] | select(.name == "git-sdk-64-minimal").resource.downloadUrl')"
94-
curl --connect-timeout 10 --retry 5 --retry-delay 0 --retry-max-time 240 \
95-
-o artifacts.zip "$download_url"
96-
97-
## Unzip and remove the artifact
98-
unzip artifacts.zip
99-
rm artifacts.zip
84+
- uses: actions/checkout@v2
85+
- uses: git-for-windows/setup-git-for-windows-sdk@v1
10086
- name: build
101-
shell: powershell
87+
shell: bash
10288
env:
10389
HOME: ${{runner.workspace}}
104-
MSYSTEM: MINGW64
10590
NO_PERL: 1
106-
run: |
107-
& .\git-sdk-64-minimal\usr\bin\bash.exe -lc @"
108-
printf '%s\n' /git-sdk-64-minimal/ >>.git/info/exclude
109-
110-
ci/make-test-artifacts.sh artifacts
111-
"@
112-
- name: upload build artifacts
113-
uses: actions/upload-artifact@v1
91+
run: ci/make-test-artifacts.sh artifacts
92+
- name: zip up tracked files
93+
run: git archive -o artifacts/tracked.tar.gz HEAD
94+
- name: upload tracked files and build artifacts
95+
uses: actions/upload-artifact@v2
11496
with:
11597
name: windows-artifacts
11698
path: artifacts
117-
- name: upload git-sdk-64-minimal
118-
uses: actions/upload-artifact@v1
119-
with:
120-
name: git-sdk-64-minimal
121-
path: git-sdk-64-minimal
12299
windows-test:
123100
runs-on: windows-latest
124101
needs: [windows-build]
@@ -127,65 +104,38 @@ jobs:
127104
matrix:
128105
nr: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
129106
steps:
130-
- uses: actions/checkout@v1
131-
- name: download build artifacts
132-
uses: actions/download-artifact@v1
107+
- name: download tracked files and build artifacts
108+
uses: actions/download-artifact@v2
133109
with:
134110
name: windows-artifacts
135111
path: ${{github.workspace}}
136-
- name: extract build artifacts
112+
- name: extract tracked files and build artifacts
137113
shell: bash
138-
run: tar xf artifacts.tar.gz
139-
- name: download git-sdk-64-minimal
140-
uses: actions/download-artifact@v1
141-
with:
142-
name: git-sdk-64-minimal
143-
path: ${{github.workspace}}/git-sdk-64-minimal/
114+
run: tar xf artifacts.tar.gz && tar xf tracked.tar.gz
115+
- uses: git-for-windows/setup-git-for-windows-sdk@v1
144116
- name: test
145-
shell: powershell
146-
run: |
147-
& .\git-sdk-64-minimal\usr\bin\bash.exe -lc @"
148-
# Let Git ignore the SDK
149-
printf '%s\n' /git-sdk-64-minimal/ >>.git/info/exclude
150-
151-
ci/run-test-slice.sh ${{matrix.nr}} 10
152-
"@
117+
shell: bash
118+
run: ci/run-test-slice.sh ${{matrix.nr}} 10
153119
- name: ci/print-test-failures.sh
154120
if: failure()
155-
shell: powershell
156-
run: |
157-
& .\git-sdk-64-minimal\usr\bin\bash.exe -lc ci/print-test-failures.sh
121+
shell: bash
122+
run: ci/print-test-failures.sh
158123
- name: Upload failed tests' directories
159124
if: failure() && env.FAILED_TEST_ARTIFACTS != ''
160-
uses: actions/upload-artifact@v1
125+
uses: actions/upload-artifact@v2
161126
with:
162127
name: failed-tests-windows
163128
path: ${{env.FAILED_TEST_ARTIFACTS}}
164129
vs-build:
165130
needs: ci-config
166131
if: needs.ci-config.outputs.enabled == 'yes'
167132
env:
168-
MSYSTEM: MINGW64
169133
NO_PERL: 1
170134
GIT_CONFIG_PARAMETERS: "'user.name=CI' 'user.email=ci@git'"
171135
runs-on: windows-latest
172136
steps:
173-
- uses: actions/checkout@v1
174-
- name: download git-sdk-64-minimal
175-
shell: bash
176-
run: |
177-
## Get artifact
178-
urlbase=https://dev.azure.com/git-for-windows/git/_apis/build/builds
179-
id=$(curl "$urlbase?definitions=22&statusFilter=completed&resultFilter=succeeded&\$top=1" |
180-
jq -r ".value[] | .id")
181-
download_url="$(curl "$urlbase/$id/artifacts" |
182-
jq -r '.value[] | select(.name == "git-sdk-64-minimal").resource.downloadUrl')"
183-
curl --connect-timeout 10 --retry 5 --retry-delay 0 --retry-max-time 240 \
184-
-o artifacts.zip "$download_url"
185-
186-
## Unzip and remove the artifact
187-
unzip artifacts.zip
188-
rm artifacts.zip
137+
- uses: actions/checkout@v2
138+
- uses: git-for-windows/setup-git-for-windows-sdk@v1
189139
- name: initialize vcpkg
190140
uses: actions/checkout@v2
191141
with:
@@ -203,75 +153,60 @@ jobs:
203153
- name: add msbuild to PATH
204154
uses: microsoft/setup-msbuild@v1
205155
- name: copy dlls to root
206-
shell: powershell
207-
run: |
208-
& compat\vcbuild\vcpkg_copy_dlls.bat release
209-
if (!$?) { exit(1) }
156+
shell: cmd
157+
run: compat\vcbuild\vcpkg_copy_dlls.bat release
210158
- name: generate Visual Studio solution
211159
shell: bash
212160
run: |
213161
cmake `pwd`/contrib/buildsystems/ -DCMAKE_PREFIX_PATH=`pwd`/compat/vcbuild/vcpkg/installed/x64-windows \
214-
-DMSGFMT_EXE=`pwd`/git-sdk-64-minimal/mingw64/bin/msgfmt.exe -DPERL_TESTS=OFF -DPYTHON_TESTS=OFF -DCURL_NO_CURL_CMAKE=ON
162+
-DNO_GETTEXT=YesPlease -DPERL_TESTS=OFF -DPYTHON_TESTS=OFF -DCURL_NO_CURL_CMAKE=ON
215163
- name: MSBuild
216164
run: msbuild git.sln -property:Configuration=Release -property:Platform=x64 -maxCpuCount:4 -property:PlatformToolset=v142
217165
- name: bundle artifact tar
218-
shell: powershell
166+
shell: bash
219167
env:
220168
MSVC: 1
221169
VCPKG_ROOT: ${{github.workspace}}\compat\vcbuild\vcpkg
222170
run: |
223-
& git-sdk-64-minimal\usr\bin\bash.exe -lc @"
224-
mkdir -p artifacts &&
225-
eval \"`$(make -n artifacts-tar INCLUDE_DLLS_IN_ARTIFACTS=YesPlease ARTIFACTS_DIRECTORY=artifacts 2>&1 | grep ^tar)\"
226-
"@
227-
- name: upload build artifacts
228-
uses: actions/upload-artifact@v1
171+
mkdir -p artifacts &&
172+
eval "$(make -n artifacts-tar INCLUDE_DLLS_IN_ARTIFACTS=YesPlease ARTIFACTS_DIRECTORY=artifacts NO_GETTEXT=YesPlease 2>&1 | grep ^tar)"
173+
- name: zip up tracked files
174+
run: git archive -o artifacts/tracked.tar.gz HEAD
175+
- name: upload tracked files and build artifacts
176+
uses: actions/upload-artifact@v2
229177
with:
230178
name: vs-artifacts
231179
path: artifacts
232180
vs-test:
233181
runs-on: windows-latest
234-
needs: [vs-build, windows-build]
182+
needs: vs-build
235183
strategy:
236184
fail-fast: false
237185
matrix:
238186
nr: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
239187
steps:
240-
- uses: actions/checkout@v1
241-
- name: download git-sdk-64-minimal
242-
uses: actions/download-artifact@v1
243-
with:
244-
name: git-sdk-64-minimal
245-
path: ${{github.workspace}}/git-sdk-64-minimal/
246-
- name: download build artifacts
247-
uses: actions/download-artifact@v1
188+
- uses: git-for-windows/setup-git-for-windows-sdk@v1
189+
- name: download tracked files and build artifacts
190+
uses: actions/download-artifact@v2
248191
with:
249192
name: vs-artifacts
250193
path: ${{github.workspace}}
251-
- name: extract build artifacts
194+
- name: extract tracked files and build artifacts
252195
shell: bash
253-
run: tar xf artifacts.tar.gz
196+
run: tar xf artifacts.tar.gz && tar xf tracked.tar.gz
254197
- name: test
255-
shell: powershell
198+
shell: bash
256199
env:
257-
MSYSTEM: MINGW64
258200
NO_SVN_TESTS: 1
259201
GIT_TEST_SKIP_REBASE_P: 1
260-
run: |
261-
& .\git-sdk-64-minimal\usr\bin\bash.exe -lc @"
262-
# Let Git ignore the SDK and the test-cache
263-
printf '%s\n' /git-sdk-64-minimal/ /test-cache/ >>.git/info/exclude
264-
265-
ci/run-test-slice.sh ${{matrix.nr}} 10
266-
"@
202+
run: ci/run-test-slice.sh ${{matrix.nr}} 10
267203
- name: ci/print-test-failures.sh
268204
if: failure()
269-
shell: powershell
270-
run: |
271-
& .\git-sdk-64-minimal\usr\bin\bash.exe -lc ci/print-test-failures.sh
205+
shell: bash
206+
run: ci/print-test-failures.sh
272207
- name: Upload failed tests' directories
273208
if: failure() && env.FAILED_TEST_ARTIFACTS != ''
274-
uses: actions/upload-artifact@v1
209+
uses: actions/upload-artifact@v2
275210
with:
276211
name: failed-tests-windows
277212
path: ${{env.FAILED_TEST_ARTIFACTS}}
@@ -302,14 +237,14 @@ jobs:
302237
jobname: ${{matrix.vector.jobname}}
303238
runs-on: ${{matrix.vector.pool}}
304239
steps:
305-
- uses: actions/checkout@v1
240+
- uses: actions/checkout@v2
306241
- run: ci/install-dependencies.sh
307242
- run: ci/run-build-and-tests.sh
308243
- run: ci/print-test-failures.sh
309244
if: failure()
310245
- name: Upload failed tests' directories
311246
if: failure() && env.FAILED_TEST_ARTIFACTS != ''
312-
uses: actions/upload-artifact@v1
247+
uses: actions/upload-artifact@v2
313248
with:
314249
name: failed-tests-${{matrix.vector.jobname}}
315250
path: ${{env.FAILED_TEST_ARTIFACTS}}
@@ -336,7 +271,7 @@ jobs:
336271
if: failure()
337272
- name: Upload failed tests' directories
338273
if: failure() && env.FAILED_TEST_ARTIFACTS != ''
339-
uses: actions/upload-artifact@v1
274+
uses: actions/upload-artifact@v2
340275
with:
341276
name: failed-tests-${{matrix.vector.jobname}}
342277
path: ${{env.FAILED_TEST_ARTIFACTS}}
@@ -347,16 +282,36 @@ jobs:
347282
jobname: StaticAnalysis
348283
runs-on: ubuntu-18.04
349284
steps:
350-
- uses: actions/checkout@v1
285+
- uses: actions/checkout@v2
351286
- run: ci/install-dependencies.sh
352287
- run: ci/run-static-analysis.sh
288+
sparse:
289+
needs: ci-config
290+
if: needs.ci-config.outputs.enabled == 'yes'
291+
env:
292+
jobname: sparse
293+
runs-on: ubuntu-20.04
294+
steps:
295+
- name: Download a current `sparse` package
296+
# Ubuntu's `sparse` version is too old for us
297+
uses: git-for-windows/get-azure-pipelines-artifact@v0
298+
with:
299+
repository: git/git
300+
definitionId: 10
301+
artifact: sparse-20.04
302+
- name: Install the current `sparse` package
303+
run: sudo dpkg -i sparse-20.04/sparse_*.deb
304+
- uses: actions/checkout@v2
305+
- name: Install other dependencies
306+
run: ci/install-dependencies.sh
307+
- run: make sparse
353308
documentation:
354309
needs: ci-config
355310
if: needs.ci-config.outputs.enabled == 'yes'
356311
env:
357312
jobname: Documentation
358313
runs-on: ubuntu-latest
359314
steps:
360-
- uses: actions/checkout@v1
315+
- uses: actions/checkout@v2
361316
- run: ci/install-dependencies.sh
362317
- run: ci/test-documentation.sh

Documentation/CodingGuidelines

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -551,6 +551,51 @@ Writing Documentation:
551551
documentation, please see the documentation-related advice in the
552552
Documentation/SubmittingPatches file).
553553

554+
In order to ensure the documentation is inclusive, avoid assuming
555+
that an unspecified example person is male or female, and think
556+
twice before using "he", "him", "she", or "her". Here are some
557+
tips to avoid use of gendered pronouns:
558+
559+
- Prefer succinctness and matter-of-factly describing functionality
560+
in the abstract. E.g.
561+
562+
--short:: Emit output in the short-format.
563+
564+
and avoid something like these overly verbose alternatives:
565+
566+
--short:: Use this to emit output in the short-format.
567+
--short:: You can use this to get output in the short-format.
568+
--short:: A user who prefers shorter output could....
569+
--short:: Should a person and/or program want shorter output, he
570+
she/they/it can...
571+
572+
This practice often eliminates the need to involve human actors in
573+
your description, but it is a good practice regardless of the
574+
avoidance of gendered pronouns.
575+
576+
- When it becomes awkward to stick to this style, prefer "you" when
577+
addressing the the hypothetical user, and possibly "we" when
578+
discussing how the program might react to the user. E.g.
579+
580+
You can use this option instead of --xyz, but we might remove
581+
support for it in future versions.
582+
583+
while keeping in mind that you can probably be less verbose, e.g.
584+
585+
Use this instead of --xyz. This option might be removed in future
586+
versions.
587+
588+
- If you still need to refer to an example person that is
589+
third-person singular, you may resort to "singular they" to avoid
590+
"he/she/him/her", e.g.
591+
592+
A contributor asks their upstream to pull from them.
593+
594+
Note that this sounds ungrammatical and unnatural to those who
595+
learned that "they" is only used for third-person plural, e.g.
596+
those who learn English as a second language in some parts of the
597+
world.
598+
554599
Every user-visible change should be reflected in the documentation.
555600
The same general rule as for code applies -- imitate the existing
556601
conventions.

0 commit comments

Comments
 (0)