diff options
| author | Tian Yuchen <cat@malon.dev> | 2026-03-13 00:42:03 +0800 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2026-03-12 10:03:23 -0700 |
| commit | 78827970ecf1cb853fc2c9059c180f91fa154c97 (patch) | |
| tree | d3ca57ff856ebf78f051ac2e085d0767a7c5ee3e /Documentation/RelNotes | |
| parent | d181b9354cf85b44455ce3ca9e6af0b9559e0ae2 (diff) | |
| download | git-78827970ecf1cb853fc2c9059c180f91fa154c97.tar.xz | |
builtin/mktree: remove USE_THE_REPOSITORY_VARIABLE
The 'cmd_mktree()' function already receives a 'struct repository *repo'
pointer, but it was previously marked as UNUSED.
Pass the 'repo' pointer down to 'mktree_line()' and 'write_tree()'.
Consequently, remove the 'USE_THE_REPOSITORY_VARIABLE' macro, replace
usages of 'the_repository', and swap 'parse_oid_hex()' with its context-aware
version 'parse_oid_hex_algop()'.
This refactoring is safe because 'cmd_mktree()' is registered with the
'RUN_SETUP' flag in 'git.c', which guarantees that the command is
executed within a initialized repository, ensuring that the passed 'repo'
pointer is never 'NULL'.
Signed-off-by: Tian Yuchen <cat@malon.dev>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/RelNotes')
0 files changed, 0 insertions, 0 deletions
