Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
134 commits
Select commit Hold shift + click to select a range
3b54f67
MyFirstContribution: mention trimming quoted text in replies
bertyuan Jun 11, 2026
5abac96
environment: move ignore_case into repo_config_values
malon7782 Jun 19, 2026
e6a79c9
config: use repo_ignore_case() to access core.ignorecase
malon7782 Jun 19, 2026
18cf52c
t6600: add test for merge-base early exit with clock skew
spkrka Jun 29, 2026
ae68032
commit-reach: guard !FIND_ALL early exit with generation ordering check
spkrka Jun 29, 2026
59fb29c
Merge branch 'ps/refs-onbranch-fixes' into ps/setup-split-discovery-a…
gitster Jun 30, 2026
4f71cef
Merge branch 'ps/setup-drop-global-state' into ps/setup-split-discove…
gitster Jun 30, 2026
cd4c25d
Merge branch 'jk/repo-info-path-keys' into ps/setup-split-discovery-a…
gitster Jun 30, 2026
8fed3ac
meson: support building fuzzers with libFuzzer
pks-t Jul 3, 2026
adf4516
oss-fuzz: add fuzzer for parsing reftables
pks-t Jul 3, 2026
657654b
reftable/basics: fix OOB read on binary search of empty range
pks-t Jul 3, 2026
ed103ab
reftable/record: don't abort when decoding invalid ref value type
pks-t Jul 3, 2026
a0eb4ca
t/unit-tests: introduce test helper to write reftable blocks
pks-t Jul 3, 2026
6914a9a
reftable/block: fix OOB write with bogus inflated log size
pks-t Jul 3, 2026
43a0669
reftable/block: fix OOB read with bogus block size
pks-t Jul 3, 2026
0d77a81
reftable/block: fix OOB read with bogus restart count
pks-t Jul 3, 2026
986590f
reftable/block: fix use of uninitialized memory when binsearch fails
pks-t Jul 3, 2026
ec42676
reftable/block: fix OOB read with bogus restart offset
pks-t Jul 3, 2026
a1c085d
reftable/table: fix NULL pointer access when seeking to bogus offsets
pks-t Jul 3, 2026
ca93c27
reftable/table: fix OOB read on truncated table
pks-t Jul 3, 2026
afd278b
t/README: document test_grep helper
mmontalbo Jul 6, 2026
04e875a
t: fix grep assertions missing file arguments
mmontalbo Jul 6, 2026
c451e96
t: extract chainlint's parser into shared module
mmontalbo Jul 6, 2026
4f8f121
t: fix Lexer line count for $() inside double-quoted strings
mmontalbo Jul 6, 2026
47f79f6
t: convert grep assertions to test_grep
mmontalbo Jul 6, 2026
be7112d
t: add greplint to detect bare grep assertions
mmontalbo Jul 6, 2026
9ca3ea9
setup: rename `check_repository_format_gently()`
pks-t Jul 7, 2026
c679995
setup: mark bogus worktree in `apply_repository_format()`
pks-t Jul 7, 2026
d43b9ac
setup: unify setup of shallow file
pks-t Jul 7, 2026
cf1687a
setup: split up concerns of `setup_git_env_internal()`
pks-t Jul 7, 2026
d66975f
setup: introduce explicit repository discovery
pks-t Jul 7, 2026
abe8941
setup: embed repository format in discovery
pks-t Jul 7, 2026
b964ad1
setup: move prefix into repository
pks-t Jul 7, 2026
28f38f3
setup: drop static `cwd` variable
pks-t Jul 7, 2026
0bf8e14
setup: propagate prefix via repository discovery
pks-t Jul 7, 2026
2513a4d
setup: make repository discovery self-contained
pks-t Jul 7, 2026
eba53f5
setup: drop redundant configuration of `startup_info->have_repository`
pks-t Jul 7, 2026
293b785
setup: pass worktree to `init_db()`
pks-t Jul 7, 2026
4df38c6
setup: mark `set_git_work_tree()` as file-local
pks-t Jul 7, 2026
18b2009
Rust: fix description in Release Notes to 2.55
gitster Jul 7, 2026
5df632c
t1517: skip svn tests if svn is not installed
bk2204 Jul 8, 2026
154aee0
parse-options: add a separate case for help output on error
bk2204 Jul 8, 2026
06f9b95
rev-parse: have --parseopt callers exit 0 on --help
bk2204 Jul 8, 2026
cdaf12f
parse-options: exit 0 on -h
bk2204 Jul 8, 2026
87bd9bd
Makefile: add $(RUST_LIB) prerequisite to osxkeychain
Jul 8, 2026
924dfce
Makefile: support universal macOS builds via RUST_TARGETS
Jul 8, 2026
1a62c1f
contrib: wire up osxkeychain in contrib/Makefile on macOS
Jul 8, 2026
ff1da37
submodule--helper: accept '-i' shorthand for update --init
martinetd Jul 8, 2026
e74c698
SubmittingPatches: document how to retract a topic
gitster Jul 8, 2026
8585c50
bundle-uri: drain remaining response on invalid bundle-uri lines
To1ne Jul 8, 2026
50de116
bundle-uri: stop sending invalid bundle configuration
jltobler Jul 8, 2026
7167667
unpack-trees: avoid quadratic index scan in next_cache_entry()
hferreiro Jul 8, 2026
c4fcd50
t1410-reflog.sh: avoid suppressing git's exit code in pipelines
Jul 9, 2026
37e3640
Merge branch 'ps/odb-drop-whence' into ps/odb-for-each-object-filter
gitster Jul 9, 2026
02d62c3
commit-graph: add trace2 instrumentation for generation DFS
spkrka Jul 9, 2026
8ea36f6
commit-graph: propagate topo_levels slab to all chain layers
spkrka Jul 9, 2026
a6b8f01
diffcore-break: guard against NULLed queue entries in merge loop
dscho Jul 10, 2026
d07d09e
diff: handle NULL return from repo_get_commit_tree()
dscho Jul 10, 2026
2fdcce1
remote: guard `remote_tracking()` against NULL remote
dscho Jul 10, 2026
d321f42
reftable/stack: guard against NULL list_file in stack_destroy
dscho Jul 10, 2026
775f1f2
mailsplit: move NULL check before first use of file handle
dscho Jul 10, 2026
74fb188
bisect: handle NULL commit in `bisect_successful()`
dscho Jul 10, 2026
e87d701
replay: die when --onto does not peel to a commit
dscho Jul 10, 2026
f5887e1
revision: avoid dereferencing NULL in `add_parents_only()`
dscho Jul 10, 2026
436ef7c
pack-bitmap: handle missing bitmap for base MIDX
dscho Jul 10, 2026
7384654
bisect: ensure non-NULL `head` before using it
dscho Jul 10, 2026
83e717e
shallow: fix NULL dereference
dscho Jul 10, 2026
7642553
shallow: give write_one_shallow() its own hex buffer
dscho Jul 10, 2026
13d8160
t/perf: add perf test for ref tombstone scenarios
spkrka Jul 10, 2026
146a946
reftable: fix quadratic behavior in the presence of tombstones
spkrka Jul 10, 2026
52bd2ff
config: refactor include_by_gitdir() into include_by_path()
black-desk Jul 10, 2026
5004829
config: add "worktree" and "worktree/i" includeIf conditions
black-desk Jul 10, 2026
9144451
b4: include change-id in cover template
black-desk Jul 10, 2026
f065d59
object-file: rename files transaction prepare function
jltobler Jul 10, 2026
9c182bb
object-file: rename files transaction fsync function
jltobler Jul 10, 2026
ee1785a
object-file: embed transaction flush logic in commit function
jltobler Jul 10, 2026
926618e
object-file: drop check for inflight transactions
jltobler Jul 10, 2026
6d01718
object-file: propagate files transaction errors
jltobler Jul 10, 2026
4576d6c
odb/transaction: propagate begin errors
jltobler Jul 10, 2026
dbb3c87
odb/transaction: propagate commit errors
jltobler Jul 10, 2026
28fbc06
odb/transaction: add transaction env interface
jltobler Jul 10, 2026
48d730a
odb/transaction: introduce ODB transaction flags
jltobler Jul 10, 2026
6c24256
builtin/receive-pack: drop redundant tmpdir env
jltobler Jul 10, 2026
bdee7b3
builtin/receive-pack: stage incoming objects via ODB transactions
jltobler Jul 10, 2026
cfd52a7
object-file: fix closing object stream twice
pks-t Jul 10, 2026
dbe8efd
t9811: break long && chains into multiple lines
Jul 11, 2026
1569919
t9811: replace 'test -f' and '! test -f' with 'test_path_*'
Jul 11, 2026
b9a7080
fast-export: standardize usage string and SYNOPSIS
chriscool Jul 13, 2026
678f3bb
t1100: modernize test style
shkuls Jul 14, 2026
9719c29
t1100: move creation of expected output into setup test
shkuls Jul 14, 2026
7b0203b
strbuf: avoid redundant reset in strbuf_getwholeline()
rscharfe Jul 14, 2026
27bed41
odb/source-packed: improve lookup when enumerating objects
pks-t Jul 15, 2026
03aaa4f
pack-bitmap: mark object filter as `const`
pks-t Jul 15, 2026
6f48b8c
pack-objects: drop unused return value from add_object_entry()
peff Jul 15, 2026
1ca65ca
pack-bitmap: allow aborting iteration of bitmapped objects
pks-t Jul 15, 2026
eaa9807
pack-bitmap: iterate object sources when opening bitmaps
pks-t Jul 15, 2026
db95bfc
pack-bitmap: drop `_1` suffix from functions that open bitmaps
pks-t Jul 15, 2026
8cd7ee7
pack-bitmap: introduce function to open bitmap for a single source
pks-t Jul 15, 2026
204daf5
odb: introduce object filters to `odb_for_each_object()`
pks-t Jul 15, 2026
bfa86e6
builtin/cat-file: filter objects via object database
pks-t Jul 15, 2026
b6b2769
t7614: avoid hiding git's exit code in a pipe
shkuls Jul 15, 2026
bd29432
Merge branch 'kk/streaming-walk-pqueue' into kk/no-walk-pathspec-fix
gitster Jul 16, 2026
32c4ed7
revision: fix --no-walk path filtering regression
spkrka Jul 16, 2026
65f37b6
Merge branch 'ps/reftable-hardening'
gitster Jul 19, 2026
2688b28
Merge branch 'ps/setup-split-discovery-and-setup'
gitster Jul 19, 2026
a6d1c35
Merge branch 'jc/relnotes-2.55-rust-fix'
gitster Jul 19, 2026
1950f46
Merge branch 'kk/commit-reach-find-all-fix'
gitster Jul 19, 2026
de46554
Merge branch 'jc/submitting-patches-abandoning'
gitster Jul 19, 2026
620657c
Merge branch 'bc/parse-options-exit-0-on-help'
gitster Jul 19, 2026
f8ec2c6
Merge branch 'sn/osxkeychain-rust-universal'
gitster Jul 19, 2026
c9a92e2
Merge branch 'mm/test-grep-lint'
gitster Jul 19, 2026
009713e
Merge branch 'gr/t1410-reflog-exit-code'
gitster Jul 19, 2026
1c103a8
Merge branch 'wy/doc-myfirstcontribution-trim-quotes'
gitster Jul 19, 2026
cae7c86
Merge branch 'hf/unpack-trees-quadratic-scan'
gitster Jul 19, 2026
f590fcd
Merge branch 'tc/bundle-uri-empty-fix'
gitster Jul 19, 2026
a336bfa
Merge branch 'ty/migrate-ignorecase'
gitster Jul 19, 2026
82c60a8
Merge branch 'kk/commit-graph-topo-levels-fix'
gitster Jul 19, 2026
cc82eaf
Merge branch 'kk/reftable-tombstone-quadratic-fix'
gitster Jul 19, 2026
0b75ef5
Merge branch 'js/coverity-fixes-null-safety'
gitster Jul 19, 2026
48bbf81
The 5th batch
gitster Jul 19, 2026
9655cb7
Merge branch 'ps/odb-stream-double-close-fix'
gitster Jul 21, 2026
f1c8bde
Merge branch 'cl/b4-cover-change-id'
gitster Jul 21, 2026
5d2e770
The 6th batch
gitster Jul 21, 2026
aebf83d
Merge branch 'dm/submodule-update-i-shorthand'
gitster Jul 22, 2026
ccf9746
Merge branch 'cl/conditional-config-on-worktree-path'
gitster Jul 22, 2026
55f961a
Merge branch 'jt/receive-pack-use-odb-transactions'
gitster Jul 22, 2026
0a4f81e
Merge branch 'ml/t9811-replace-test-f'
gitster Jul 22, 2026
9822fc3
Merge branch 'cc/doc-fast-export-synopsis-fix'
gitster Jul 22, 2026
88620f0
Merge branch 'rs/strbuf-avoid-redundant-reset'
gitster Jul 22, 2026
5183689
Merge branch 'ps/odb-for-each-object-filter'
gitster Jul 22, 2026
2b8f09f
Merge branch 'sk/t1100-modernize'
gitster Jul 22, 2026
af4899f
Merge branch 'sk/t7614-do-not-hide-git-exit-status'
gitster Jul 22, 2026
60aa81f
Merge branch 'kk/no-walk-pathspec-fix'
gitster Jul 22, 2026
9a0c470
The 7th batch
gitster Jul 22, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions .b4-cover-template
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,5 @@ ${diffstat}
${range_diff}
---
base-commit: ${base_commit}
change-id: ${change_id}
${prerequisites}
5 changes: 5 additions & 0 deletions Documentation/MyFirstContribution.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -1477,6 +1477,11 @@ effect which had not occurred to you. It is always okay to ask for clarification
if you aren't sure why a change was suggested, or what the reviewer is asking
you to do.

When replying to review comments, quote only the parts of the message that are
relevant to your response. It is usually helpful to trim away unrelated context,
such as large portions of the patch that are not being discussed, while keeping
enough quoted text for readers to understand what you are responding to.

Make sure your email client has a plaintext email mode and it is turned on; the
Git list rejects HTML email. Please also follow the mailing list etiquette
outlined in the
Expand Down
4 changes: 2 additions & 2 deletions Documentation/RelNotes/2.55.0.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,8 @@ Performance, Internal Implementation, Development Support etc.
* Promisor remote handling has been refactored and fixed in
preparation for auto-configuration of advertised remotes.
* Rust support is enabled by default (but still allows opting out) in
some future version of Git.
* Rust support is enabled by default (but still allows opting out);
in Git version 3.0, Rust will become mandatory.
* Preparation of the xdiff/ codebase to work with Rust.
Expand Down
135 changes: 135 additions & 0 deletions Documentation/RelNotes/2.56.0.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,19 @@ UI, Workflows & Features
output has been optimized to reserve a column for marks (caret,
question mark, or asterisk) only when such marks are actually shown.

* Option parsing with 'git rev-parse --parseopt' and in most 'git'
subcommands has been updated to exit with 0 (instead of 129) when the
help option ('-h' or '--help') is requested directly by the user,
aligning with standard Unix convention.

* The '[includeIf "condition"]' conditional inclusion facility for
configuration files has been taught to use the location of the
worktree in its condition.

* The usage string and SYNOPSIS for 'git fast-export' have been
standardized to make them consistent with each other and with other
commands.


Performance, Internal Implementation, Development Support etc.
--------------------------------------------------------------
Expand Down Expand Up @@ -108,6 +121,91 @@ Performance, Internal Implementation, Development Support etc.
the generated header file 'hook-list.h' is built before compiling
files in 'builtin_sources' that depend on it.

* The repository discovery and repository configuration phases, which
were previously intertwined in 'setup.c', have been split. Repository
discovery has been updated to populate a 'struct repo_discovery'
without modifying the repository state, which is then taken by
repository configuration to initialize the repository, paving the way
for clean unification of repository configuration.

* The 'SubmittingPatches' document has been updated to explicitly
describe the expectation for contributors to retract or abandon their
patch series when they are no longer pursuing it.

* The contributor guide has been updated to advise new contributors to
trim irrelevant quoted text when replying to review comments, matching
the existing advice given to reviewers.

* The build system has been updated to support building universal macOS
binaries when 'Rust' is enabled, by compiling separate static archives
for each target triple listed in 'RUST_TARGETS' and combining them
using the macOS 'lipo' tool. The 'git-credential-osxkeychain' helper
has been updated to link against '$(RUST_LIB)' when 'Rust' is enabled.

* The test suite has been updated to use the 'test_grep' helper instead
of bare 'grep' for test assertions, allowing file contents to be
printed on failure for easier debugging. A new 'greplint' linter has
been introduced to detect and prevent new bare 'grep' assertions from
being added to the test suite.

* The pipelines in 't1410-reflog.sh' have been replaced with the
'test_stdout_line_count' helper to avoid suppressing the exit code of
'git' commands, ensuring failures are not hidden from the test suite.

* The cache-scanning loop in 'next_cache_entry()' has been optimized
to avoid rescanning already-unpacked index entries, preventing a
quadratic performance slow-down when diffing the working tree
against a commit with a pathspec matching early index entries.

* The global configuration variable 'ignore_case' (representing the
'core.ignorecase' configuration) has been migrated into 'struct
repo_config_values' to tie it to a specific repository instance.

* The performance of ref updates and reads using the 'reftable' backend
in the presence of many deletion tombstone records has been optimized
by removing the tombstone suppression flag from the merged iterator
and instead skipping tombstones at higher-level call sites where
iteration bounds are known.

* Various code paths have been hardened against potential NULL-pointer
dereferences and invalid file descriptor accesses flagged by
Coverity.

* The in-tree 'b4' cover letter template has been updated to include the
'change-id' trailer, ensuring that sent tags generated by 'b4' contain
the required tracking information for subsequent runs.

* 'git receive-pack' has been refactored to use ODB transaction
interfaces instead of directly managing 'tmp_objdir' for staging
incoming objects, bringing it closer to being ODB backend agnostic.

* The test script 't/t9811-git-p4-label-import.sh' has been
modernized to use 'test_path_is_file' and 'test_path_is_missing'
instead of raw 'test -f' and '! test -f' calls.

* A redundant strbuf_reset() call in the 'HAVE_GETDELIM' path of
strbuf_getwholeline() has been removed, as getdelim() overwrites the
buffer and the length is updated afterward.

* The object database enumeration interface odb_for_each_object() has
been taught to accept object filters, allowing the underlying backends
to optimize the traversal by using reachability bitmaps when
available. 'git cat-file --batch-all-objects' has been updated to use
this generic interface, simplifying its code and avoiding direct
access to ODB backend internals.

* The test script 't/t1100-commit-tree-options.sh' has been modernized
by converting test cases to the modern style (using single quotes and
tab indentation) and moving the creation of the expected file inside
the setup test so it runs under the protection of the test harness.

* The test script 't/t7614-merge-signoff.sh' has been updated to avoid
suppressing the exit code of 'git' commands in a pipe.

* The 'git rev-list --no-walk' command has been corrected to restore
pathspec filtering, which was lost when the streaming walk was
refactored.


Fixes since v2.55
-----------------
Expand Down Expand Up @@ -215,3 +313,40 @@ Fixes since v2.55
escape sequences that use colon-separated subfields (e.g., for
256-color or true-color codes).
(merge 3792b2aea4 mm/sideband-ansi-sgr-colon-fix later to maint).

* The 'reftable' code has been hardened against corrupted tables by
fixing out-of-bounds writes, out-of-bounds reads, and abort calls
during parsing.
(merge ca93c27328 ps/reftable-hardening later to maint).

* A description in the release notes for Git 2.55.0 has been
retroactively updated to clarify that Rust support is enabled by
default, but still optional, and will become mandatory in Git 3.0.
(merge 18b2009d14 jc/relnotes-2.55-rust-fix later to maint).

* The early-exit optimization in 'paint_down_to_common()' has been
gated on the queue being generation-ordered, fixing a bug where
'git merge-base' (without '--all') could return incorrect results
on repositories with v1 commit graphs and clock skew.
(merge ae68032a8d kk/commit-reach-find-all-fix later to maint).

* The client-side parser of the server-advertised bundle-URI list has
been updated to drain the remaining response in order to avoid
protocol desynchronization when the server sends a misconfigured list.
Also, the server-side has been taught to omit empty configuration
values instead of sending invalid key-value lines.
(merge 50de1169e4 tc/bundle-uri-empty-fix later to maint).

* The 'topo_levels' slab was propagated only to the topmost layer of a
split commit-graph chain, causing topological levels for commits in
base layers to be recomputed during incremental writes. This has been
corrected.

* The stream-based object signature verification path has been
corrected to avoid double-closing the stream on read errors.
(merge cfd52a74a0 ps/odb-stream-double-close-fix later to maint).

* The '-i' shorthand for the '--init' option, which was accepted by the
'git submodule update' command until it was broken in a modernization
of the option-parsing code, has been restored.
(merge ff1da37f58 dm/submodule-update-i-shorthand later to maint).
14 changes: 14 additions & 0 deletions Documentation/SubmittingPatches
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,20 @@ of review.
top, it gets merged to the 'master' branch and waits to become part
of the next major release.

But sometimes things do not work as planned:

. If a mailing list discussion convinces you that your changes aren't
ideal, please explicitly retract the topic to save the maintainer
time and effort.

. If you must drop a topic due to shifting priorities, lack of time,
or other commitments, notify the list as a courtesy so others can
take over. Anyone can resurrect the topic later when they have the
capacity to do so.

. Topics with unaddressed review comments that remain inactive for
four weeks may be discarded by the maintainer.

In the following sections, many techniques and conventions are listed
to help your patches get reviewed effectively in such a life cycle.

Expand Down
53 changes: 53 additions & 0 deletions Documentation/config.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,51 @@ refer to linkgit:gitignore[5] for details. For convenience:
This is the same as `gitdir` except that matching is done
case-insensitively (e.g. on case-insensitive file systems)

`worktree`::
The data that follows the keyword `worktree` and a colon is used as a
glob pattern. If the working directory of the current worktree matches
the pattern, the include condition is met.
+
The worktree location is the path where files are checked out (as returned
by `git rev-parse --show-toplevel`). This is different from `gitdir`, which
matches the `.git` directory path. In a linked worktree, the worktree path
is the directory where that worktree's files are located, not the main
repository's `.git` directory.
+
The pattern uses the same glob syntax as `gitdir` (including `~/`, `./`,
`**/`, and trailing-`/` prefix matching). This condition will never match
in a bare repository (which has no worktree).
+
Unlike `gitdir`, the `worktree` condition currently matches only the
realpath-resolved worktree location. If the working tree was entered via a
symbolic link, a pattern that uses the symbolic-link spelling may not match;
use the real path instead.
+
This is useful when you want to apply configuration based on where the
working tree is located on the filesystem. For example, a contributor who
works on the same project both personally and as an employee can use
different `user.name` and `user.email` values depending on which directory
the worktree is checked out under:
+
----
[includeIf "worktree:/home/user/work/"]
path = ~/.config/git/work.inc
[includeIf "worktree:/home/user/personal/"]
path = ~/.config/git/personal.inc
----
+
While `extensions.worktreeConfig` (see linkgit:git-worktree[1]) also supports
per-worktree configuration, it stores the config inside each repository's
`.git/config.worktree` file and requires running `git config --worktree`
inside each worktree individually. In contrast, `includeIf "worktree:..."`
can be set once in a global or system-level configuration file (e.g.
`~/.config/git/config`) and applies to all repositories at once based on
their worktree location.

`worktree/i`::
This is the same as `worktree` except that matching is done
case-insensitively (e.g. on case-insensitive file systems)

`onbranch`::
The data that follows the keyword `onbranch` and a colon is taken to be a
pattern with standard globbing wildcards and two additional
Expand Down Expand Up @@ -244,6 +289,14 @@ Example
[includeIf "gitdir:~/to/group/"]
path = /path/to/foo.inc

; include if the worktree is at /path/to/project-build
[includeIf "worktree:/path/to/project-build"]
path = build-config.inc

; include for all worktrees inside /path/to/group
[includeIf "worktree:/path/to/group/"]
path = group-config.inc

; relative paths are always relative to the including
; file (if the condition is true); their location is not
; affected by the condition
Expand Down
2 changes: 1 addition & 1 deletion Documentation/git-fast-export.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ git-fast-export - Git data exporter
SYNOPSIS
--------
[verse]
'git fast-export' [<options>] | 'git fast-import'
'git fast-export' [<options>] [<revision-range>] [[--] <path>...]

DESCRIPTION
-----------
Expand Down
47 changes: 42 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -500,6 +500,14 @@ include shared.mak
#
# Building Rust code requires Cargo.
#
# Define RUST_TARGETS if you want to cross-compile. If left unspecified, it uses
# the default Rust target on the system.
#
# On macOS, this supports specifying multiple targets, separated by a space.
# This will produce a Universal static library using `lipo`.
#
# Example: RUST_TARGETS="aarch64-apple-darwin x86_64-apple-darwin"
#
# == SHA-1 and SHA-256 defines ==
#
# === SHA-1 backend ===
Expand Down Expand Up @@ -939,16 +947,19 @@ TEST_SHELL_PATH = $(SHELL_PATH)

LIB_FILE = libgit.a

ifndef NO_RUST
ifdef DEBUG
RUST_TARGET_DIR = target/debug
RUST_BUILD_CONFIG = debug
else
RUST_TARGET_DIR = target/release
RUST_BUILD_CONFIG = release
endif

ifeq ($(uname_S),Windows)
RUST_LIB = $(RUST_TARGET_DIR)/gitcore.lib
RUST_LIB_NAME = gitcore.lib
else
RUST_LIB = $(RUST_TARGET_DIR)/libgitcore.a
RUST_LIB_NAME = libgitcore.a
endif
RUST_LIB = target/$(RUST_BUILD_CONFIG)/$(RUST_LIB_NAME)
endif

GITLIBS = common-main.o $(LIB_FILE)
Expand Down Expand Up @@ -2601,6 +2612,7 @@ FUZZ_OBJS += oss-fuzz/fuzz-date.o
FUZZ_OBJS += oss-fuzz/fuzz-pack-headers.o
FUZZ_OBJS += oss-fuzz/fuzz-pack-idx.o
FUZZ_OBJS += oss-fuzz/fuzz-parse-attr-line.o
FUZZ_OBJS += oss-fuzz/fuzz-reftable.o
FUZZ_OBJS += oss-fuzz/fuzz-url-decode-mem.o
.PHONY: fuzz-objs
fuzz-objs: $(FUZZ_OBJS)
Expand Down Expand Up @@ -3019,11 +3031,35 @@ scalar$X: scalar.o GIT-LDFLAGS $(GITLIBS)
$(LIB_FILE): $(LIB_OBJS)
$(QUIET_AR)$(RM) $@ && $(AR) $(ARFLAGS) $@ $^

ifndef NO_RUST
ifeq ($(RUST_TARGETS),)
$(RUST_LIB): Cargo.toml $(RUST_SOURCES) $(LIB_FILE)
$(QUIET_CARGO)cargo build $(CARGO_ARGS)
else
ifneq ($(words $(RUST_TARGETS)),1)
ifneq ($(uname_S),Darwin)
$(error Building universal Rust libraries requires macOS (lipo is not available on $(uname_S)))
endif
endif

RUST_MEMBER_LIBS = $(foreach target,$(RUST_TARGETS),target/$(target)/$(RUST_BUILD_CONFIG)/$(RUST_LIB_NAME))
$(RUST_MEMBER_LIBS): target/%/$(RUST_BUILD_CONFIG)/$(RUST_LIB_NAME): Cargo.toml $(RUST_SOURCES) $(LIB_FILE)
$(QUIET_CARGO)cargo build $(CARGO_ARGS) --target $*

$(RUST_LIB): $(RUST_MEMBER_LIBS)
$(call mkdir_p_parent_template)
$(QUIET_GEN)\
if test $(words $(RUST_TARGETS)) -gt 1; \
then \
lipo -create $^ -output $@; \
else \
cp $< $@; \
fi
endif

.PHONY: rust
rust: $(RUST_LIB)
endif

export DEFAULT_EDITOR DEFAULT_PAGER

Expand Down Expand Up @@ -4074,7 +4110,8 @@ $(LIBGIT_HIDDEN_EXPORT): $(LIBGIT_PARTIAL_EXPORT)
contrib/libgit-sys/libgitpub.a: $(LIBGIT_HIDDEN_EXPORT)
$(AR) $(ARFLAGS) $@ $^

contrib/credential/osxkeychain/git-credential-osxkeychain: contrib/credential/osxkeychain/git-credential-osxkeychain.o $(LIB_FILE) GIT-LDFLAGS
# When Rust is enabled, git-credential-osxkeychain depends on Rust symbols in $(RUST_LIB)
contrib/credential/osxkeychain/git-credential-osxkeychain: contrib/credential/osxkeychain/git-credential-osxkeychain.o $(LIB_FILE) $(RUST_LIB) GIT-LDFLAGS
$(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) \
$(filter %.o,$^) $(LIBS) -framework Security -framework CoreFoundation

Expand Down
2 changes: 1 addition & 1 deletion apply.c
Original file line number Diff line number Diff line change
Expand Up @@ -4008,7 +4008,7 @@ static int path_is_beyond_symlink_1(struct apply_state *state, struct strbuf *na
struct cache_entry *ce;

ce = index_file_exists(state->repo->index, name->buf,
name->len, ignore_case);
name->len, repo_ignore_case(the_repository));
if (ce && S_ISLNK(ce->ce_mode))
return 1;
} else {
Expand Down
2 changes: 1 addition & 1 deletion builtin/add.c
Original file line number Diff line number Diff line change
Expand Up @@ -581,7 +581,7 @@ int cmd_add(int argc,
string_list_clear(&only_match_skip_worktree, 0);
}

transaction = odb_transaction_begin(repo->objects);
odb_transaction_begin_or_die(repo->objects, &transaction, 0);

ps_matched = xcalloc(pathspec.nr, 1);
if (add_renormalize)
Expand Down
Loading