Skip to content

Commit cd9ef9c

Browse files
committed
Merge branch 'master' of github.com:git/git
* 'master' of github.com:git/git: (762 commits) Git 2.34-rc0 wrapper: remove xunsetenv() log: document --encoding behavior on iconv() failure Revert "logmsg_reencode(): warn when iconv() fails" completion: fix incorrect bash/zsh string equality check add, rm, mv: fix bug that prevents the update of non-sparse dirs git-bundle.txt: add missing words and punctuation Documentation/Makefile: fix lint-docs mkdir dependency submodule: drop unused sm_name parameter from append_fetch_remotes() The fifteenth batch gitweb.txt: change "folder" to "directory" gitignore.txt: change "folder" to "directory" git-multi-pack-index.txt: change "folder" to "directory" git.txt: fix typo archive: describe compression level option config.txt: fix typo command-list.txt: remove 'sparse-index' from main help userdiff-cpp: back out the digit-separators in numbers submodule--helper: fix incorrect newlines in an error message branch (doc): -m/-c copies config and reflog ...
2 parents 6643503 + 7e27bd5 commit cd9ef9c

File tree

642 files changed

+17724
-8840
lines changed

Some content is hidden

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

642 files changed

+17724
-8840
lines changed

.cirrus.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,15 @@ env:
22
CIRRUS_CLONE_DEPTH: 1
33

44
freebsd_12_task:
5+
env:
6+
GIT_PROVE_OPTS: "--timer --jobs 10"
7+
GIT_TEST_OPTS: "--no-chain-lint --no-bin-wrappers"
8+
MAKEFLAGS: "-j4"
9+
DEFAULT_TEST_TARGET: prove
10+
DEVELOPER: 1
511
freebsd_instance:
6-
image: freebsd-12-1-release-amd64
12+
image_family: freebsd-12-2
13+
memory: 2G
714
install_script:
815
pkg install -y gettext gmake perl5
916
create_user_script:

.github/workflows/l10n.yml

Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
name: git-l10n
2+
3+
on: [push, pull_request_target]
4+
5+
jobs:
6+
git-po-helper:
7+
if: >-
8+
endsWith(github.repository, '/git-po') ||
9+
contains(github.head_ref, 'l10n') ||
10+
contains(github.ref, 'l10n')
11+
runs-on: ubuntu-latest
12+
permissions:
13+
pull-requests: write
14+
steps:
15+
- name: Setup base and head objects
16+
id: setup-tips
17+
run: |
18+
if test "${{ github.event_name }}" = "pull_request_target"
19+
then
20+
base=${{ github.event.pull_request.base.sha }}
21+
head=${{ github.event.pull_request.head.sha }}
22+
else
23+
base=${{ github.event.before }}
24+
head=${{ github.event.after }}
25+
fi
26+
echo "::set-output name=base::$base"
27+
echo "::set-output name=head::$head"
28+
- name: Run partial clone
29+
run: |
30+
git -c init.defaultBranch=master init --bare .
31+
git remote add \
32+
--mirror=fetch \
33+
origin \
34+
https://github.com/${{ github.repository }}
35+
# Fetch tips that may be unreachable from github.ref:
36+
# - For a forced push, "$base" may be unreachable.
37+
# - For a "pull_request_target" event, "$head" may be unreachable.
38+
args=
39+
for commit in \
40+
${{ steps.setup-tips.outputs.base }} \
41+
${{ steps.setup-tips.outputs.head }}
42+
do
43+
case $commit in
44+
*[^0]*)
45+
args="$args $commit"
46+
;;
47+
*)
48+
# Should not fetch ZERO-OID.
49+
;;
50+
esac
51+
done
52+
git -c protocol.version=2 fetch \
53+
--progress \
54+
--no-tags \
55+
--no-write-fetch-head \
56+
--filter=blob:none \
57+
origin \
58+
${{ github.ref }} \
59+
$args
60+
- uses: actions/setup-go@v2
61+
with:
62+
go-version: '>=1.16'
63+
- name: Install git-po-helper
64+
run: go install github.com/git-l10n/git-po-helper@main
65+
- name: Install other dependencies
66+
run: |
67+
sudo apt-get update -q &&
68+
sudo apt-get install -q -y gettext
69+
- name: Run git-po-helper
70+
id: check-commits
71+
run: |
72+
exit_code=0
73+
git-po-helper check-commits \
74+
--github-action-event="${{ github.event_name }}" -- \
75+
${{ steps.setup-tips.outputs.base }}..${{ steps.setup-tips.outputs.head }} \
76+
>git-po-helper.out 2>&1 || exit_code=$?
77+
if test $exit_code -ne 0 || grep -q WARNING git-po-helper.out
78+
then
79+
# Remove ANSI colors which are proper for console logs but not
80+
# proper for PR comment.
81+
echo "COMMENT_BODY<<EOF" >>$GITHUB_ENV
82+
perl -pe 's/\e\[[0-9;]*m//g; s/\bEOF$//g' git-po-helper.out >>$GITHUB_ENV
83+
echo "EOF" >>$GITHUB_ENV
84+
fi
85+
cat git-po-helper.out
86+
exit $exit_code
87+
- name: Create comment in pull request for report
88+
uses: mshick/add-pr-comment@v1
89+
if: >-
90+
always() &&
91+
github.event_name == 'pull_request_target' &&
92+
env.COMMENT_BODY != ''
93+
with:
94+
repo-token: ${{ secrets.GITHUB_TOKEN }}
95+
repo-token-user-login: 'github-actions[bot]'
96+
message: >
97+
${{ steps.check-commits.outcome == 'failure' && 'Errors and warnings' || 'Warnings' }}
98+
found by [git-po-helper](https://github.com/git-l10n/git-po-helper#readme) in workflow
99+
[#${{ github.run_number }}](${{ env.GITHUB_SERVER_URL }}/${{ github.repository }}/actions/runs/${{ github.run_id }}):
100+
101+
```
102+
103+
${{ env.COMMENT_BODY }}
104+
105+
```

.github/workflows/main.yml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ jobs:
8888
env:
8989
HOME: ${{runner.workspace}}
9090
NO_PERL: 1
91-
run: ci/make-test-artifacts.sh artifacts
91+
run: . /etc/profile && ci/make-test-artifacts.sh artifacts
9292
- name: zip up tracked files
9393
run: git archive -o artifacts/tracked.tar.gz HEAD
9494
- name: upload tracked files and build artifacts
@@ -115,7 +115,7 @@ jobs:
115115
- uses: git-for-windows/setup-git-for-windows-sdk@v1
116116
- name: test
117117
shell: bash
118-
run: ci/run-test-slice.sh ${{matrix.nr}} 10
118+
run: . /etc/profile && ci/run-test-slice.sh ${{matrix.nr}} 10
119119
- name: ci/print-test-failures.sh
120120
if: failure()
121121
shell: bash
@@ -198,8 +198,7 @@ jobs:
198198
shell: bash
199199
env:
200200
NO_SVN_TESTS: 1
201-
GIT_TEST_SKIP_REBASE_P: 1
202-
run: ci/run-test-slice.sh ${{matrix.nr}} 10
201+
run: . /etc/profile && ci/run-test-slice.sh ${{matrix.nr}} 10
203202
- name: ci/print-test-failures.sh
204203
if: failure()
205204
shell: bash
@@ -232,6 +231,9 @@ jobs:
232231
- jobname: linux-gcc-default
233232
cc: gcc
234233
pool: ubuntu-latest
234+
- jobname: linux-leaks
235+
cc: gcc
236+
pool: ubuntu-latest
235237
env:
236238
CC: ${{matrix.vector.cc}}
237239
jobname: ${{matrix.vector.jobname}}
@@ -259,6 +261,8 @@ jobs:
259261
image: alpine
260262
- jobname: Linux32
261263
image: daald/ubuntu32:xenial
264+
- jobname: pedantic
265+
image: fedora
262266
env:
263267
jobname: ${{matrix.vector.jobname}}
264268
runs-on: ubuntu-latest
@@ -271,7 +275,7 @@ jobs:
271275
if: failure()
272276
- name: Upload failed tests' directories
273277
if: failure() && env.FAILED_TEST_ARTIFACTS != ''
274-
uses: actions/upload-artifact@v2
278+
uses: actions/upload-artifact@v1
275279
with:
276280
name: failed-tests-${{matrix.vector.jobname}}
277281
path: ${{env.FAILED_TEST_ARTIFACTS}}

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,6 @@
125125
/git-range-diff
126126
/git-read-tree
127127
/git-rebase
128-
/git-rebase--preserve-merges
129128
/git-receive-pack
130129
/git-reflog
131130
/git-remote
@@ -190,6 +189,7 @@
190189
/gitweb/static/gitweb.min.*
191190
/config-list.h
192191
/command-list.h
192+
/hook-list.h
193193
*.tar.gz
194194
*.dsc
195195
*.deb
@@ -224,6 +224,7 @@
224224
*.lib
225225
*.res
226226
*.sln
227+
*.sp
227228
*.suo
228229
*.ncb
229230
*.vcproj

Documentation/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,5 @@ manpage-base-url.xsl
1414
SubmittingPatches.txt
1515
tmp-doc-diff/
1616
GIT-ASCIIDOCFLAGS
17+
/.build/
1718
/GIT-EXCLUDED-PROGRAMS

Documentation/Makefile

Lines changed: 61 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ SP_ARTICLES += $(API_DOCS)
9090
TECH_DOCS += MyFirstContribution
9191
TECH_DOCS += MyFirstObjectWalk
9292
TECH_DOCS += SubmittingPatches
93+
TECH_DOCS += technical/bundle-format
9394
TECH_DOCS += technical/hash-function-transition
9495
TECH_DOCS += technical/http-protocol
9596
TECH_DOCS += technical/index-format
@@ -225,18 +226,23 @@ endif
225226

226227
ifneq ($(findstring $(MAKEFLAGS),s),s)
227228
ifndef V
229+
QUIET = @
228230
QUIET_ASCIIDOC = @echo ' ' ASCIIDOC $@;
229231
QUIET_XMLTO = @echo ' ' XMLTO $@;
230232
QUIET_DB2TEXI = @echo ' ' DB2TEXI $@;
231233
QUIET_MAKEINFO = @echo ' ' MAKEINFO $@;
232234
QUIET_DBLATEX = @echo ' ' DBLATEX $@;
233235
QUIET_XSLTPROC = @echo ' ' XSLTPROC $@;
234236
QUIET_GEN = @echo ' ' GEN $@;
235-
QUIET_LINT = @echo ' ' LINT $@;
236237
QUIET_STDERR = 2> /dev/null
237238
QUIET_SUBDIR0 = +@subdir=
238239
QUIET_SUBDIR1 = ;$(NO_SUBDIR) echo ' ' SUBDIR $$subdir; \
239240
$(MAKE) $(PRINT_DIR) -C $$subdir
241+
242+
QUIET_LINT_GITLINK = @echo ' ' LINT GITLINK $<;
243+
QUIET_LINT_MANSEC = @echo ' ' LINT MAN SEC $<;
244+
QUIET_LINT_MANEND = @echo ' ' LINT MAN END $<;
245+
240246
export V
241247
endif
242248
endif
@@ -284,7 +290,7 @@ install-html: html
284290
../GIT-VERSION-FILE: FORCE
285291
$(QUIET_SUBDIR0)../ $(QUIET_SUBDIR1) GIT-VERSION-FILE
286292

287-
ifneq ($(MAKECMDGOALS),clean)
293+
ifneq ($(filter-out lint-docs clean,$(MAKECMDGOALS)),)
288294
-include ../GIT-VERSION-FILE
289295
endif
290296

@@ -343,6 +349,7 @@ GIT-ASCIIDOCFLAGS: FORCE
343349
fi
344350

345351
clean:
352+
$(RM) -rf .build/
346353
$(RM) *.xml *.xml+ *.html *.html+ *.1 *.5 *.7
347354
$(RM) *.texi *.texi+ *.texi++ git.info gitman.info
348355
$(RM) *.pdf
@@ -456,14 +463,61 @@ quick-install-html: require-htmlrepo
456463
print-man1:
457464
@for i in $(MAN1_TXT); do echo $$i; done
458465

459-
lint-docs::
460-
$(QUIET_LINT)$(PERL_PATH) lint-gitlink.perl \
466+
## Lint: Common
467+
.build:
468+
$(QUIET)mkdir $@
469+
.build/lint-docs: | .build
470+
$(QUIET)mkdir $@
471+
472+
## Lint: gitlink
473+
.build/lint-docs/gitlink: | .build/lint-docs
474+
$(QUIET)mkdir $@
475+
.build/lint-docs/gitlink/howto: | .build/lint-docs/gitlink
476+
$(QUIET)mkdir $@
477+
.build/lint-docs/gitlink/config: | .build/lint-docs/gitlink
478+
$(QUIET)mkdir $@
479+
LINT_DOCS_GITLINK = $(patsubst %.txt,.build/lint-docs/gitlink/%.ok,$(HOWTO_TXT) $(DOC_DEP_TXT))
480+
$(LINT_DOCS_GITLINK): | .build/lint-docs/gitlink
481+
$(LINT_DOCS_GITLINK): | .build/lint-docs/gitlink/howto
482+
$(LINT_DOCS_GITLINK): | .build/lint-docs/gitlink/config
483+
$(LINT_DOCS_GITLINK): lint-gitlink.perl
484+
$(LINT_DOCS_GITLINK): .build/lint-docs/gitlink/%.ok: %.txt
485+
$(QUIET_LINT_GITLINK)$(PERL_PATH) lint-gitlink.perl \
486+
$< \
461487
$(HOWTO_TXT) $(DOC_DEP_TXT) \
462488
--section=1 $(MAN1_TXT) \
463489
--section=5 $(MAN5_TXT) \
464-
--section=7 $(MAN7_TXT); \
465-
$(PERL_PATH) lint-man-end-blurb.perl $(MAN_TXT); \
466-
$(PERL_PATH) lint-man-section-order.perl $(MAN_TXT);
490+
--section=7 $(MAN7_TXT) >$@
491+
.PHONY: lint-docs-gitlink
492+
lint-docs-gitlink: $(LINT_DOCS_GITLINK)
493+
494+
## Lint: man-end-blurb
495+
.build/lint-docs/man-end-blurb: | .build/lint-docs
496+
$(QUIET)mkdir $@
497+
LINT_DOCS_MAN_END_BLURB = $(patsubst %.txt,.build/lint-docs/man-end-blurb/%.ok,$(MAN_TXT))
498+
$(LINT_DOCS_MAN_END_BLURB): | .build/lint-docs/man-end-blurb
499+
$(LINT_DOCS_MAN_END_BLURB): lint-man-end-blurb.perl
500+
$(LINT_DOCS_MAN_END_BLURB): .build/lint-docs/man-end-blurb/%.ok: %.txt
501+
$(QUIET_LINT_MANEND)$(PERL_PATH) lint-man-end-blurb.perl $< >$@
502+
.PHONY: lint-docs-man-end-blurb
503+
lint-docs-man-end-blurb: $(LINT_DOCS_MAN_END_BLURB)
504+
505+
## Lint: man-section-order
506+
.build/lint-docs/man-section-order: | .build/lint-docs
507+
$(QUIET)mkdir $@
508+
LINT_DOCS_MAN_SECTION_ORDER = $(patsubst %.txt,.build/lint-docs/man-section-order/%.ok,$(MAN_TXT))
509+
$(LINT_DOCS_MAN_SECTION_ORDER): | .build/lint-docs/man-section-order
510+
$(LINT_DOCS_MAN_SECTION_ORDER): lint-man-section-order.perl
511+
$(LINT_DOCS_MAN_SECTION_ORDER): .build/lint-docs/man-section-order/%.ok: %.txt
512+
$(QUIET_LINT_MANSEC)$(PERL_PATH) lint-man-section-order.perl $< >$@
513+
.PHONY: lint-docs-man-section-order
514+
lint-docs-man-section-order: $(LINT_DOCS_MAN_SECTION_ORDER)
515+
516+
## Lint: list of targets above
517+
.PHONY: lint-docs
518+
lint-docs: lint-docs-gitlink
519+
lint-docs: lint-docs-man-end-blurb
520+
lint-docs: lint-docs-man-section-order
467521

468522
ifeq ($(wildcard po/Makefile),po/Makefile)
469523
doc-l10n install-l10n::

Documentation/MyFirstContribution.txt

Lines changed: 31 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1029,22 +1029,42 @@ kidding - be patient!)
10291029
[[v2-git-send-email]]
10301030
=== Sending v2
10311031

1032-
Skip ahead to <<reviewing,Responding to Reviews>> for information on how to
1033-
handle comments from reviewers. Continue this section when your topic branch is
1034-
shaped the way you want it to look for your patchset v2.
1032+
This section will focus on how to send a v2 of your patchset. To learn what
1033+
should go into v2, skip ahead to <<reviewing,Responding to Reviews>> for
1034+
information on how to handle comments from reviewers.
1035+
1036+
We'll reuse our `psuh` topic branch for v2. Before we make any changes, we'll
1037+
mark the tip of our v1 branch for easy reference:
10351038

1036-
When you're ready with the next iteration of your patch, the process is fairly
1037-
similar.
1039+
----
1040+
$ git checkout psuh
1041+
$ git branch psuh-v1
1042+
----
10381043

1039-
First, generate your v2 patches again:
1044+
Refine your patch series by using `git rebase -i` to adjust commits based upon
1045+
reviewer comments. Once the patch series is ready for submission, generate your
1046+
patches again, but with some new flags:
10401047

10411048
----
1042-
$ git format-patch -v2 --cover-letter -o psuh/ master..psuh
1049+
$ git format-patch -v2 --cover-letter -o psuh/ --range-diff master..psuh-v1 master..
10431050
----
10441051

1045-
This will add your v2 patches, all named like `v2-000n-my-commit-subject.patch`,
1046-
to the `psuh/` directory. You may notice that they are sitting alongside the v1
1047-
patches; that's fine, but be careful when you are ready to send them.
1052+
The `--range-diff master..psuh-v1` parameter tells `format-patch` to include a
1053+
range-diff between `psuh-v1` and `psuh` in the cover letter (see
1054+
linkgit:git-range-diff[1]). This helps tell reviewers about the differences
1055+
between your v1 and v2 patches.
1056+
1057+
The `-v2` parameter tells `format-patch` to output your patches
1058+
as version "2". For instance, you may notice that your v2 patches are
1059+
all named like `v2-000n-my-commit-subject.patch`. `-v2` will also format
1060+
your patches by prefixing them with "[PATCH v2]" instead of "[PATCH]",
1061+
and your range-diff will be prefaced with "Range-diff against v1".
1062+
1063+
Afer you run this command, `format-patch` will output the patches to the `psuh/`
1064+
directory, alongside the v1 patches. Using a single directory makes it easy to
1065+
refer to the old v1 patches while proofreading the v2 patches, but you will need
1066+
to be careful to send out only the v2 patches. We will use a pattern like
1067+
"psuh/v2-*.patch" (not "psuh/*.patch", which would match v1 and v2 patches).
10481068

10491069
Edit your cover letter again. Now is a good time to mention what's different
10501070
between your last version and now, if it's something significant. You do not
@@ -1082,7 +1102,7 @@ to the command:
10821102
----
10831103
$ git send-email [email protected]
10841104
--in-reply-to="<[email protected]>"
1085-
psuh/v2*
1105+
psuh/v2-*.patch
10861106
----
10871107

10881108
[[single-patch]]

0 commit comments

Comments
 (0)