Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
87264b7
docs: update pack index v3 format
bk2204 Oct 9, 2025
6947ed3
docs: update offset order for pack index v3
bk2204 Oct 9, 2025
d477892
docs: reflect actual double signature for tags
bk2204 Oct 9, 2025
24d46f8
docs: improve ambiguous areas of pack format documentation
bk2204 Oct 9, 2025
d4f4395
docs: add documentation for loose objects
bk2204 Oct 9, 2025
b95c59e
rev-parse: allow printing compatibility hash
bk2204 Oct 9, 2025
51acda7
fsck: consider gpgsig headers expected in tags
bk2204 Oct 9, 2025
5f23aa6
t: allow specifying compatibility hash
bk2204 Oct 9, 2025
db00605
t1010: use BROKEN_OBJECTS prerequisite
bk2204 Oct 9, 2025
85abbfc
doc: git-pull: move <repository> and <refspec> params
jvns Oct 15, 2025
59b28f9
doc: git-pull: clarify options for integrating remote branch
jvns Oct 15, 2025
d8942ac
doc: git-pull: delete the example
jvns Oct 15, 2025
e9d221b
doc: git-pull: clarify how to exit a conflicted merge
jvns Oct 15, 2025
0c4f134
t2401: update path checks using test_path helpers
Solobarine Oct 15, 2025
d014fb2
build(deps): bump actions/download-artifact from 4 to 5
dscho Oct 16, 2025
63541ed
build(deps): bump actions/checkout from 4 to 5
dscho Oct 16, 2025
b195b95
build(deps): bump actions/setup-python from 5 to 6
dscho Oct 16, 2025
96978d7
build(deps): bump actions/github-script from 7 to 8
dscho Oct 16, 2025
c9ccf81
Merge branch 'js/ci-github-actions-update'
gitster Oct 22, 2025
98401c1
Merge branch 'bc/sha1-256-interop-01'
gitster Oct 22, 2025
0e74643
Merge branch 'je/doc-pull'
gitster Oct 22, 2025
f3fac33
Merge branch 'so/t2401-use-test-path-helpers'
gitster Oct 22, 2025
c54a18e
The twenty-second batch
gitster Oct 22, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/check-style.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
jobname: ClangFormat
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
with:
fetch-depth: 0

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/check-whitespace.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
check-whitespace:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
with:
fetch-depth: 0

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/coverity.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
COVERITY_LANGUAGE: cxx
COVERITY_PLATFORM: overridden-below
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- name: install minimal Git for Windows SDK
if: contains(matrix.os, 'windows')
uses: git-for-windows/setup-git-for-windows-sdk@v1
Expand Down
34 changes: 17 additions & 17 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ jobs:
echo "skip_concurrent=$skip_concurrent" >>$GITHUB_OUTPUT
- name: skip if the commit or tree was already tested
id: skip-if-redundant
uses: actions/github-script@v7
uses: actions/github-script@v8
if: steps.check-ref.outputs.enabled == 'yes'
with:
github-token: ${{secrets.GITHUB_TOKEN}}
Expand Down Expand Up @@ -112,7 +112,7 @@ jobs:
group: windows-build-${{ github.ref }}
cancel-in-progress: ${{ needs.ci-config.outputs.skip_concurrent == 'yes' }}
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- uses: git-for-windows/setup-git-for-windows-sdk@v1
- name: build
shell: bash
Expand Down Expand Up @@ -140,7 +140,7 @@ jobs:
cancel-in-progress: ${{ needs.ci-config.outputs.skip_concurrent == 'yes' }}
steps:
- name: download tracked files and build artifacts
uses: actions/download-artifact@v4
uses: actions/download-artifact@v5
with:
name: windows-artifacts
path: ${{github.workspace}}
Expand Down Expand Up @@ -173,10 +173,10 @@ jobs:
group: vs-build-${{ github.ref }}
cancel-in-progress: ${{ needs.ci-config.outputs.skip_concurrent == 'yes' }}
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- uses: git-for-windows/setup-git-for-windows-sdk@v1
- name: initialize vcpkg
uses: actions/checkout@v4
uses: actions/checkout@v5
with:
repository: 'microsoft/vcpkg'
path: 'compat/vcbuild/vcpkg'
Expand Down Expand Up @@ -226,7 +226,7 @@ jobs:
steps:
- uses: git-for-windows/setup-git-for-windows-sdk@v1
- name: download tracked files and build artifacts
uses: actions/download-artifact@v4
uses: actions/download-artifact@v5
with:
name: vs-artifacts
path: ${{github.workspace}}
Expand Down Expand Up @@ -258,8 +258,8 @@ jobs:
group: windows-meson-build-${{ github.ref }}
cancel-in-progress: ${{ needs.ci-config.outputs.skip_concurrent == 'yes' }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- uses: actions/checkout@v5
- uses: actions/setup-python@v6
- name: Set up dependencies
shell: pwsh
run: pip install meson ninja
Expand All @@ -286,13 +286,13 @@ jobs:
group: windows-meson-test-${{ matrix.nr }}-${{ github.ref }}
cancel-in-progress: ${{ needs.ci-config.outputs.skip_concurrent == 'yes' }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- uses: actions/checkout@v5
- uses: actions/setup-python@v6
- name: Set up dependencies
shell: pwsh
run: pip install meson ninja
- name: Download build artifacts
uses: actions/download-artifact@v4
uses: actions/download-artifact@v5
with:
name: windows-meson-artifacts
path: build
Expand Down Expand Up @@ -331,7 +331,7 @@ jobs:
TEST_OUTPUT_DIRECTORY: ${{github.workspace}}/t
runs-on: ${{matrix.vector.pool}}
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- run: ci/install-dependencies.sh
- run: ci/run-build-and-tests.sh
- name: print test failures
Expand All @@ -352,7 +352,7 @@ jobs:
CI_JOB_IMAGE: ubuntu-latest
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- run: ci/install-dependencies.sh
- run: ci/run-build-and-minimal-fuzzers.sh
dockerized:
Expand Down Expand Up @@ -429,7 +429,7 @@ jobs:
else
apt-get -q update && apt-get -q -y install git
fi
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- run: ci/install-dependencies.sh
- run: useradd builder --create-home
- run: chown -R builder .
Expand All @@ -454,7 +454,7 @@ jobs:
group: static-analysis-${{ github.ref }}
cancel-in-progress: ${{ needs.ci-config.outputs.skip_concurrent == 'yes' }}
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- run: ci/install-dependencies.sh
- run: ci/run-static-analysis.sh
- run: ci/check-directional-formatting.bash
Expand All @@ -469,7 +469,7 @@ jobs:
group: sparse-${{ github.ref }}
cancel-in-progress: ${{ needs.ci-config.outputs.skip_concurrent == 'yes' }}
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- name: Install other dependencies
run: ci/install-dependencies.sh
- run: make sparse
Expand All @@ -485,6 +485,6 @@ jobs:
CI_JOB_IMAGE: ubuntu-latest
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- run: ci/install-dependencies.sh
- run: ci/test-documentation.sh
1 change: 1 addition & 0 deletions Documentation/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ MAN5_TXT += gitformat-bundle.adoc
MAN5_TXT += gitformat-chunk.adoc
MAN5_TXT += gitformat-commit-graph.adoc
MAN5_TXT += gitformat-index.adoc
MAN5_TXT += gitformat-loose.adoc
MAN5_TXT += gitformat-pack.adoc
MAN5_TXT += gitformat-signature.adoc
MAN5_TXT += githooks.adoc
Expand Down
4 changes: 4 additions & 0 deletions Documentation/RelNotes/2.52.0.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,8 @@ Performance, Internal Implementation, Development Support etc.
and one for xdiff), roll everything into a single libgit.a archive.
This would help later effort to FFI into Rust.

* The beginning of SHA1-SHA256 interoperability work.


Fixes since v2.51
-----------------
Expand Down Expand Up @@ -380,3 +382,5 @@ including security updates, are included in this release.
(merge 3860985105 js/unreachable-workaround-for-no-symlink-head later to maint).
(merge b3ac6e737d kh/doc-continued-paragraph-fix later to maint).
(merge 2cebca0582 tb/cat-file-objectmode-update later to maint).
(merge 96978d7545 js/ci-github-actions-update later to maint).
(merge 0c4f1346ca so/t2401-use-test-path-helpers later to maint).
6 changes: 6 additions & 0 deletions Documentation/fsck-msgids.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@
`badFilemode`::
(INFO) A tree contains a bad filemode entry.

`badGpgsig`::
(ERROR) A tag contains a bad (truncated) signature (e.g., `gpgsig`) header.

`badHeaderContinuation`::
(ERROR) A continuation header (such as for `gpgsig`) is unexpectedly truncated.

`badName`::
(ERROR) An author/committer name is empty.

Expand Down
93 changes: 40 additions & 53 deletions Documentation/git-pull.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -15,68 +15,54 @@ SYNOPSIS
DESCRIPTION
-----------

Incorporates changes from a remote repository into the current branch.
If the current branch is behind the remote, then by default it will
fast-forward the current branch to match the remote. If the current
branch and the remote have diverged, the user needs to specify how to
reconcile the divergent branches with `--rebase` or `--no-rebase` (or
the corresponding configuration option in `pull.rebase`).

More precisely, `git pull` runs `git fetch` with the given parameters
and then depending on configuration options or command line flags,
will call either `git rebase` or `git merge` to reconcile diverging
branches.

<repository> should be the name of a remote repository as
passed to linkgit:git-fetch[1]. <refspec> can name an
arbitrary remote ref (for example, the name of a tag) or even
a collection of refs with corresponding remote-tracking branches
(e.g., refs/heads/{asterisk}:refs/remotes/origin/{asterisk}),
but usually it is the name of a branch in the remote repository.

Default values for <repository> and <branch> are read from the
"remote" and "merge" configuration for the current branch
as set by linkgit:git-branch[1] `--track`.

Assume the following history exists and the current branch is
"`master`":
Integrate changes from a remote repository into the current branch.

------------
A---B---C master on origin
/
D---E---F---G master
^
origin/master in your repository
------------
First, `git pull` runs `git fetch` with the same arguments
(excluding merge options) to fetch remote branch(es).
Then it decides which remote branch to integrate: if you run `git pull`
with no arguments this defaults to the <<UPSTREAM-BRANCHES,upstream>>
for the current branch.
Then it integrates that branch into the current branch.

Then "`git pull`" will fetch and replay the changes from the remote
`master` branch since it diverged from the local `master` (i.e., `E`)
until its current commit (`C`) on top of `master` and record the
result in a new commit along with the names of the two parent commits
and a log message from the user describing the changes.

------------
A---B---C origin/master
/ \
D---E---F---G---H master
------------
There are 4 main options for integrating the remote branch:

See linkgit:git-merge[1] for details, including how conflicts
are presented and handled.
1. `git pull --ff-only` will only do "fast-forward" updates: it
fails if your local branch has diverged from the remote branch.
This is the default.
2. `git pull --rebase` runs `git rebase`
3. `git pull --no-rebase` runs `git merge`.
4. `git pull --squash` runs `git merge --squash`

In Git 1.7.0 or later, to cancel a conflicting merge, use
`git reset --merge`. *Warning*: In older versions of Git, running 'git pull'
with uncommitted changes is discouraged: while possible, it leaves you
in a state that may be hard to back out of in the case of a conflict.
You can also set the configuration options `pull.rebase`, `pull.squash`,
or `pull.ff` with your preferred behaviour.

If any of the remote changes overlap with local uncommitted changes,
the merge will be automatically canceled and the work tree untouched.
It is generally best to get any local changes in working order before
pulling or stash them away with linkgit:git-stash[1].
If there's a merge conflict during the merge or rebase that you don't
want to handle, you can safely abort it with `git merge --abort` or `git
--rebase abort`.

OPTIONS
-------

<repository>::
The "remote" repository to pull from. This can be either
a URL (see the section <<URLS,GIT URLS>> below) or the name
of a remote (see the section <<REMOTES,REMOTES>> below).
+
Defaults to the configured upstream for the current branch, or `origin`.
See <<UPSTREAM-BRANCHES,UPSTREAM BRANCHES>> below for more on how to
configure upstreams.

<refspec>::
Which branch or other reference(s) to fetch and integrate into the
current branch, for example `main` in `git pull origin main`.
Defaults to the configured upstream for the current branch.
+
This can be a branch, tag, or other collection of reference(s).
See <<fetch-refspec,<refspec>>> below under "Options related to fetching"
for the full syntax, and <<DEFAULT-BEHAVIOUR,DEFAULT BEHAVIOUR>> below
for how `git pull` uses this argument to determine which remote branch
to integrate.

-q::
--quiet::
This is passed to both underlying git-fetch to squelch reporting of
Expand Down Expand Up @@ -145,6 +131,7 @@ include::urls-remotes.adoc[]

include::merge-strategies.adoc[]

[[DEFAULT-BEHAVIOUR]]
DEFAULT BEHAVIOUR
-----------------

Expand Down
11 changes: 6 additions & 5 deletions Documentation/git-rev-parse.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -324,11 +324,12 @@ The following options are unaffected by `--path-format`:
path of the current directory relative to the top-level
directory.

--show-object-format[=(storage|input|output)]::
Show the object format (hash algorithm) used for the repository
for storage inside the `.git` directory, input, or output. For
input, multiple algorithms may be printed, space-separated.
If not specified, the default is "storage".
--show-object-format[=(storage|input|output|compat)]::
Show the object format (hash algorithm) used for the repository for storage
inside the `.git` directory, input, output, or compatibility. For input,
multiple algorithms may be printed, space-separated. If `compat` is
requested and no compatibility algorithm is enabled, prints an empty line. If
not specified, the default is "storage".

--show-ref-format::
Show the reference storage format used for the repository.
Expand Down
53 changes: 53 additions & 0 deletions Documentation/gitformat-loose.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
gitformat-loose(5)
==================

NAME
----
gitformat-loose - Git loose object format


SYNOPSIS
--------
[verse]
$GIT_DIR/objects/[0-9a-f][0-9a-f]/*

DESCRIPTION
-----------

Loose objects are how Git stores individual objects, where every object is
written as a separate file.

Over the lifetime of a repository, objects are usually written as loose objects
initially. Eventually, these loose objects will be compacted into packfiles
via repository maintenance to improve disk space usage and speed up the lookup
of these objects.

== Loose objects

Each loose object contains a prefix, followed immediately by the data of the
object. The prefix contains `<type> <size>\0`. `<type>` is one of `blob`,
`tree`, `commit`, or `tag` and `size` is the size of the data (without the
prefix) as a decimal integer expressed in ASCII.

The entire contents, prefix and data concatenated, is then compressed with zlib
and the compressed data is stored in the file. The object ID of the object is
the SHA-1 or SHA-256 (as appropriate) hash of the uncompressed data.

The file for the loose object is stored under the `objects` directory, with the
first two hex characters of the object ID being the directory and the remaining
characters being the file name. This is done to shard the data and avoid too
many files being in one directory, since some file systems perform poorly with
many items in a directory.

As an example, the empty tree contains the data (when uncompressed) `tree 0\0`
and, in a SHA-256 repository, would have the object ID
`6ef19b41225c5369f1c104d45d8d85efa9b057b53b14b4b9b939dd74decc5321` and would be
stored under
`$GIT_DIR/objects/6e/f19b41225c5369f1c104d45d8d85efa9b057b53b14b4b9b939dd74decc5321`.

Similarly, a blob containing the contents `abc` would have the uncompressed
data of `blob 3\0abc`.

GIT
---
Part of the linkgit:git[1] suite
Loading