Skip to content

Commit 5413d85

Browse files
authored
Merge branch 'git:master' into lisp-userdiff_driver
2 parents fb4c8dc + 9e8f4e9 commit 5413d85

File tree

746 files changed

+34450
-16578
lines changed

Some content is hidden

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

746 files changed

+34450
-16578
lines changed

.editorconfig

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ insert_final_newline = true
88
indent_style = tab
99
tab_width = 8
1010

11+
[templates/hooks/*.sample]
12+
indent_style = tab
13+
tab_width = 8
14+
1115
[*.py]
1216
indent_style = space
1317
indent_size = 4

.gitattributes

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,5 @@ CODE_OF_CONDUCT.md -whitespace
1717
/Documentation/gitk.adoc conflict-marker-size=32
1818
/Documentation/user-manual.adoc conflict-marker-size=32
1919
/t/t????-*.sh conflict-marker-size=32
20+
/t/unit-tests/clar/test/expected/* whitespace=-blank-at-eof
21+
/templates/hooks/*.sample whitespace=indent,trail,space,incomplete text eol=lf

.github/CONTRIBUTING.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ conveniently send your Pull Requests commits to our mailing list.
1010

1111
Please read ["A note from the maintainer"](https://git.kernel.org/pub/scm/git/git.git/plain/MaintNotes?h=todo)
1212
to learn how the Git project is managed, and how you can work with it.
13-
In addition, we highly recommend you to read [our submission guidelines](../Documentation/SubmittingPatches).
13+
In addition, we highly recommend you to read
14+
[our submission guidelines](https://git-scm.com/docs/SubmittingPatches).
1415

1516
If you prefer video, then [this talk](https://www.youtube.com/watch?v=Q7i_qQW__q4&feature=youtu.be&t=6m4s)
1617
might be useful to you as the presenter walks you through the contribution

.github/workflows/main.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ jobs:
150150
- uses: git-for-windows/setup-git-for-windows-sdk@v1
151151
- name: test
152152
shell: bash
153-
run: . /etc/profile && ci/run-test-slice.sh ${{matrix.nr}} 10
153+
run: . /etc/profile && ci/run-test-slice.sh $((${{matrix.nr}} + 1)) 10
154154
- name: print test failures
155155
if: failure() && env.FAILED_TEST_ARTIFACTS != ''
156156
shell: bash
@@ -237,7 +237,7 @@ jobs:
237237
shell: bash
238238
env:
239239
NO_SVN_TESTS: 1
240-
run: . /etc/profile && ci/run-test-slice.sh ${{matrix.nr}} 10
240+
run: . /etc/profile && ci/run-test-slice.sh $((${{matrix.nr}} + 1)) 10
241241
- name: print test failures
242242
if: failure() && env.FAILED_TEST_ARTIFACTS != ''
243243
shell: bash
@@ -297,8 +297,8 @@ jobs:
297297
name: windows-meson-artifacts
298298
path: build
299299
- name: Test
300-
shell: pwsh
301-
run: ci/run-test-slice-meson.sh build ${{matrix.nr}} 10
300+
shell: bash
301+
run: ci/run-test-slice-meson.sh build $((${{matrix.nr}} + 1)) 10
302302
- name: print test failures
303303
if: failure() && env.FAILED_TEST_ARTIFACTS != ''
304304
shell: bash
@@ -480,7 +480,7 @@ jobs:
480480
group: rust-analysis-${{ github.ref }}
481481
cancel-in-progress: ${{ needs.ci-config.outputs.skip_concurrent == 'yes' }}
482482
steps:
483-
- uses: actions/checkout@v4
483+
- uses: actions/checkout@v5
484484
- run: ci/install-dependencies.sh
485485
- run: ci/run-rust-checks.sh
486486
sparse:

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@
7979
/git-grep
8080
/git-hash-object
8181
/git-help
82+
/git-history
8283
/git-hook
8384
/git-http-backend
8485
/git-http-fetch

.gitlab-ci.yml

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -101,13 +101,13 @@ test:osx:
101101
parallel:
102102
matrix:
103103
- jobname: osx-clang
104-
image: macos-14-xcode-15
104+
image: macos-15-xcode-16
105105
CC: clang
106106
- jobname: osx-reftable
107-
image: macos-14-xcode-15
107+
image: macos-15-xcode-16
108108
CC: clang
109109
- jobname: osx-meson
110-
image: macos-14-xcode-15
110+
image: macos-15-xcode-16
111111
CC: clang
112112
artifacts:
113113
paths:
@@ -157,19 +157,22 @@ test:mingw64:
157157
parallel: 10
158158

159159
.msvc-meson:
160+
variables:
161+
TEST_OUTPUT_DIRECTORY: "C:/Git-Test"
160162
tags:
161163
- saas-windows-medium-amd64
162164
before_script:
163165
- *windows_before_script
164166
- choco install -y git meson ninja rust-ms
165167
- Import-Module $env:ChocolateyInstall\helpers\chocolateyProfile.psm1
166168
- refreshenv
169+
- New-Item -Path $env:TEST_OUTPUT_DIRECTORY -ItemType Directory
167170

168171
build:msvc-meson:
169172
extends: .msvc-meson
170173
stage: build
171174
script:
172-
- meson setup build --vsenv -Dperl=disabled -Dbackend_max_links=1 -Dcredential_helpers=wincred
175+
- meson setup build --vsenv -Dperl=disabled -Dbackend_max_links=1 -Dcredential_helpers=wincred -Dtest_output_directory="$TEST_OUTPUT_DIRECTORY"
173176
- meson compile -C build
174177
artifacts:
175178
paths:
@@ -183,11 +186,21 @@ test:msvc-meson:
183186
- job: "build:msvc-meson"
184187
artifacts: true
185188
script:
186-
- meson test -C build --no-rebuild --print-errorlogs --slice $Env:CI_NODE_INDEX/$Env:CI_NODE_TOTAL
189+
- |
190+
& "C:/Program Files/Git/usr/bin/bash.exe" -l -c 'ci/run-test-slice-meson.sh build $CI_NODE_INDEX $CI_NODE_TOTAL'
191+
after_script:
192+
- |
193+
if ($env:CI_JOB_STATUS -ne "success") {
194+
& "C:/Program Files/Git/usr/bin/bash.exe" -l -c 'ci/print-test-failures.sh'
195+
Move-Item -Path "$env:TEST_OUTPUT_DIRECTORY/failed-test-artifacts" -Destination t/
196+
}
187197
parallel: 10
188198
artifacts:
199+
paths:
200+
- t/failed-test-artifacts
189201
reports:
190202
junit: build/meson-logs/testlog.junit.xml
203+
when: on_failure
191204

192205
test:fuzz-smoke-tests:
193206
image: ubuntu:latest

.mailmap

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,9 @@ Jason Riedy <ejr@eecs.berkeley.edu> <ejr@cs.berkeley.edu>
107107
Jay Soffian <jaysoffian@gmail.com> <jaysoffian+git@gmail.com>
108108
Jean-Noël Avila <jn.avila@free.fr> Jean-Noel Avila
109109
Jean-Noël Avila <jn.avila@free.fr> Jean-Noël AVILA
110+
Jean-Noël Avila <jn.avila@free.fr> Jean-Noel Avila <jean-noel.avila@scantech.fr>
111+
Jean-Noël Avila <jn.avila@free.fr> Jean-Noël AVILA <avila.jn@gmail.com>
112+
Jean-Noël Avila <jn.avila@free.fr> Jean-Noël Avila via GitGitGadget <gitgitgadget@gmail.com>
110113
Jeff King <peff@peff.net> <peff@github.com>
111114
Jeff Muizelaar <jmuizelaar@mozilla.com> <jeff@infidigm.net>
112115
Jens Axboe <axboe@kernel.dk> <axboe@suse.de>
@@ -221,11 +224,14 @@ Peter Krefting <peter@softwolves.pp.se> <peter@softwolves.pp.se>
221224
Peter Krefting <peter@softwolves.pp.se> <peter@svarten.intern.softwolves.pp.se>
222225
Petr Baudis <pasky@ucw.cz> <pasky@suse.cz>
223226
Petr Baudis <pasky@ucw.cz> <xpasky@machine>
224-
Phil Hord <hordp@cisco.com> <phil.hord@gmail.com>
227+
Phil Hord <phil.hord@gmail.com> <hordp@cisco.com>
228+
Phil Hord <phil.hord@gmail.com> <phord@purestorage.com>
225229
Philip Jägenstedt <philip@foolip.org> <philip.jagenstedt@gmail.com>
226230
Philip Oakley <philipoakley@iee.email> <philipoakley@iee.org> # secondary <philipoakley@dunelm.org.uk>
227231
Philipp A. Hartmann <pah@qo.cx> <ph@sorgh.de>
228232
Philippe Bruhat <book@cpan.org>
233+
Phillip Wood <phillip.wood@dunelm.org.uk> <phillip.wood123@gmail.com>
234+
Phillip Wood <phillip.wood@dunelm.org.uk> <phillip.wood@talktalk.net>
229235
Ralf Thielow <ralf.thielow@gmail.com> <ralf.thielow@googlemail.com>
230236
Ramsay Jones <ramsay@ramsayjones.plus.com> <ramsay@ramsay1.demon.co.uk>
231237
Ramkumar Ramachandra <r@artagnon.com> <artagnon@gmail.com>
@@ -277,6 +283,7 @@ Thomas Ackermann <th.acker@arcor.de> <th.acker66@arcor.de>
277283
Thomas Rast <tr@thomasrast.ch> <trast@student.ethz.ch>
278284
Thomas Rast <tr@thomasrast.ch> <trast@inf.ethz.ch>
279285
Thomas Rast <tr@thomasrast.ch> <trast@google.com>
286+
Tian Yuchen <cat@malon.dev> <a3205153416@gmail.com>
280287
Timo Hirvonen <tihirvon@gmail.com> <tihirvon@ee.oulu.fi>
281288
Toby Allsopp <Toby.Allsopp@navman.co.nz> <toby.allsopp@navman.co.nz>
282289
Tom Grennan <tmgrennan@gmail.com> <tgrennan@redback.com>

Documentation/BreakingChanges.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ milestones for the introduction of Rust:
190190
1. Initially, with Git 2.52, support for Rust will be auto-detected by Meson and
191191
disabled in our Makefile so that the project can sort out the initial
192192
infrastructure.
193-
2. In Git 2.53, both build systems will default-enable support for Rust.
193+
2. In Git 2.55, both build systems will default-enable support for Rust.
194194
Consequently, builds will break by default if Rust is not available on the
195195
build host. The use of Rust can still be explicitly disabled via build
196196
flags.

Documentation/CodingGuidelines

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,16 @@ Git in general, a few rough rules are:
3333
achieve and why the changes were necessary (more on this in the
3434
accompanying SubmittingPatches document).
3535

36+
- A label "NEEDSWORK:" followed by a description of the things to
37+
be done is a way to leave in-code comments to document design
38+
decisions yet to be made. 80% of the work to resolve a NEEDSWORK
39+
comment is to decide if it still makes sense to do so, since the
40+
situation around the codebase may have changed since the comment
41+
was written. It can be a very valid change to remove an existing
42+
NEEDSWORK comment without doing anything else, with the commit log
43+
message describing a good argument why it does not make sense to do
44+
the thing the NEEDSWORK comment mentioned.
45+
3646
Make your code readable and sensible, and don't try to be clever.
3747

3848
As for more concrete guidelines, just imitate the existing code
@@ -430,6 +440,8 @@ For C programs:
430440
*/
431441
_("Here is a translatable string explained by the above.");
432442

443+
We do not use // comments.
444+
433445
- Double negation is often harder to understand than no negation
434446
at all.
435447

@@ -656,6 +668,31 @@ For C programs:
656668
unsigned other_field:1;
657669
unsigned field_with_longer_name:1;
658670

671+
- When a function `F` accepts flags, those flags should be defined as `enum
672+
F_flags`. Individual flag definitions should start with `F` and be in
673+
all-uppercase letters. Flag values should be represented via bit shifts.
674+
E.g.
675+
676+
enum frobnicate_flags {
677+
FROBNICATE_FOO = (1 << 0),
678+
FROBNICATE_BAR = (1 << 1),
679+
};
680+
681+
int frobnicate(enum frobnicate_flags flags);
682+
683+
- Array names should be named in the singular form if the individual items are
684+
subject of use. E.g.:
685+
686+
char *dog[] = ...;
687+
walk_dog(dog[0]);
688+
walk_dog(dog[1]);
689+
690+
Cases where the array is employed as a whole rather than as its unit parts,
691+
the plural forms is preferable. E.g:
692+
693+
char *dogs[] = ...;
694+
walk_all_dogs(dogs);
695+
659696
For Perl programs:
660697

661698
- Most of the C guidelines above apply.

Documentation/MyFirstContribution.adoc

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,8 @@ on the command line, including the name of our command. (If `prefix` is empty
331331
for you, try `cd Documentation/ && ../bin-wrappers/git psuh`). That's not so
332332
helpful. So what other context can we get?
333333

334-
Add a line to `#include "config.h"` and `#include "repository.h"`.
334+
Add a line to `#include "config.h"`, `#include "repository.h"` and
335+
`#include "environment.h"`.
335336
Then, add the following bits to the function body:
336337
function body:
337338

@@ -351,7 +352,7 @@ function body:
351352
apply standard precedence rules. `repo_config_get_string_tmp()` will look up
352353
a specific key ("user.name") and give you the value. There are a number of
353354
single-key lookup functions like this one; you can see them all (and more info
354-
about how to use `repo_config()`) in `Documentation/technical/api-config.adoc`.
355+
about how to use `repo_config()`) in `config.h`.
355356

356357
You should see that the name printed matches the one you see when you run:
357358

@@ -429,6 +430,7 @@ Add the following includes:
429430
----
430431
#include "commit.h"
431432
#include "pretty.h"
433+
#include "strbuf.h"
432434
----
433435

434436
Then, add the following lines within your implementation of `cmd_psuh()` near
@@ -503,8 +505,8 @@ git-psuh - Delight users' typo with a shy horse
503505
504506
SYNOPSIS
505507
--------
506-
[verse]
507-
'git-psuh [<arg>...]'
508+
[synopsis]
509+
git psuh [<arg>...]
508510
509511
DESCRIPTION
510512
-----------
@@ -726,9 +728,10 @@ $ prove -j$(nproc) --shuffle t[0-9]*.sh
726728
----
727729

728730
NOTE: You can also do this with `make test` or use any testing harness which can
729-
speak TAP. `prove` can run concurrently. `shuffle` randomizes the order the
730-
tests are run in, which makes them resilient against unwanted inter-test
731-
dependencies. `prove` also makes the output nicer.
731+
speak TAP. `prove` can run concurrently. `-j$(nproc)` runs tests using all
732+
available CPUs in parallel, but the job count can be adjusted as needed.
733+
`shuffle` randomizes the order the tests are run in, which makes them resilient
734+
against unwanted inter-test dependencies. `prove` also makes the output nicer.
732735

733736
Go ahead and commit this change, as well.
734737

0 commit comments

Comments
 (0)