Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
12 changes: 9 additions & 3 deletions Documentation/RelNotes/2.56.0.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,11 @@ UI, Workflows & Features
clones, reclaiming space. Guards prevent running during other
operations or if referenced by the index.

* The documentation for 'git format-rev' has been updated to use the
[synopsis] block definition on code blocks to properly highlight
placeholders, and a quoting inconsistency in the running text has
been fixed.


Performance, Internal Implementation, Development Support etc.
--------------------------------------------------------------
Expand Down Expand Up @@ -343,14 +348,12 @@ Performance, Internal Implementation, Development Support etc.
positive warning from the 'CHECK_ASSERTION_SIDE_EFFECTS' build with
GCC 15 in the Bloom filter code has also been silenced to facilitate
the image upgrade.
(merge 1a1579c42d jk/ci-static-analysis-image-bump later to maint).

* The alias tests in 't/t0014-alias.sh' have been updated to dynamically
query the list of deprecated commands using 'git
--list-cmds=deprecated' to avoid test failures when running with
'WITH_BREAKING_CHANGES' in a build directory that contains stale
executables of formerly deprecated commands.
(merge bc57ecb915 jk/t0014-dynamic-deprecated-cmds later to maint).

* The code path that deals with relative paths in the diff-lib has
been cleaned up.
Expand Down Expand Up @@ -389,7 +392,6 @@ Performance, Internal Implementation, Development Support etc.
* The 'ssh-agent' tests in 't7528' have been fixed to work when the
user's login shell is csh-like, by explicitly passing '-s' to
'ssh-agent' to force Bourne shell syntax.
(merge d5dd17756d kl/t7528-ssh-agent-for-csh-users later to maint).

* A compatibility wrapper for writev(3p) has been reintroduced,
including fixes for CMake build and 'MAX_IO_SIZE' limits on NonStop.
Expand Down Expand Up @@ -434,6 +436,10 @@ Performance, Internal Implementation, Development Support etc.
related callback signatures across several subsystems, simplifying the
API now that trace output no longer uses it.

* A heap-use-after-free bug in the object name parsing code when
reporting failures with a relative path to a sparse directory has
been corrected.


Fixes since v2.55
-----------------
Expand Down
9 changes: 5 additions & 4 deletions Documentation/git-format-rev.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -93,12 +93,13 @@ acts as a _terminator_, not a _separator_. In other words, the final
line or record is also terminated by the terminator character.

The mode `--stdin-mode=text` replaces each object name with the
formatted commit, i.e. the format `%s` would transform some commit
object name to `<subject>` without any termination. Like this:
formatted commit, i.e. the format `"%s"` would transform some commit
object name to `"<subject>"` without any termination. Like this:

----
[synopsis]
--
Did we not fix this in "<subject>"?
----
--

It is safe to interactively read and write from this command since each
record is immediately flushed.
Expand Down
14 changes: 8 additions & 6 deletions object-name.c
Original file line number Diff line number Diff line change
Expand Up @@ -1803,13 +1803,15 @@ static enum get_oid_result get_oid_with_context_1(struct repository *repo,
memcmp(ce->name, cp, namelen))
break;
if (ce_stage(ce) == stage) {
int ret = reject_tree_in_index(repo, only_to_die, ce,
stage, prefix, cp);

if (!ret) {
oidcpy(oid, &ce->oid);
oc->mode = ce->ce_mode;
}
free(new_path);
if (reject_tree_in_index(repo, only_to_die, ce,
stage, prefix, cp))
return -1;
oidcpy(oid, &ce->oid);
oc->mode = ce->ce_mode;
return 0;
return ret;
}
pos++;
}
Expand Down
11 changes: 11 additions & 0 deletions t/t1092-sparse-checkout-compatibility.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1405,6 +1405,17 @@ do
"
done

test_expect_success 'relative path to a sparse directory' '
init_repos &&

# A ":<stage>:<path>" argument whose path is relative is resolved
# into a heap-allocated buffer, and a sparse directory found at that
# path is reported through it. Cover that combination, so that the
# reporting does not read the buffer after it has been released.
test_sparse_match test_must_fail git show :0:./folder1/ &&
test_sparse_match test_must_fail git rev-parse :0:./folder1/
'

test_expect_success 'submodule handling' '
init_repos &&

Expand Down