aboutsummaryrefslogtreecommitdiff
path: root/compat/writev.c
diff options
context:
space:
mode:
authorShreyansh Paliwal <shreyanshpaliwalcmsmn@gmail.com>2026-03-17 21:20:29 +0530
committerJunio C Hamano <gitster@pobox.com>2026-03-17 09:27:13 -0700
commit3cfe355ca74aae5cf90a4eca73a341732b0eb456 (patch)
tree82ab35ab20bbda276f6f71662a2bb3db672ace17 /compat/writev.c
parentca1db8a0f7dc0dbea892e99f5b37c5fe5861be71 (diff)
downloadgit-3cfe355ca74aae5cf90a4eca73a341732b0eb456.tar.xz
add-patch: use repository instance from add_i_state instead of the_repository
Functions parse_diff(), edit_hunk_manually() and patch_update_file() use the_repository even though a repository instance is already available via struct add_i_state s which is defined in struct add_p_state *s. Use 's->s.r' instead of the_repository to avoid relying on global state. All callers pass a valid add_p_state and this does not change any behavior. This aligns with the ongoing effort to reduce usage of the_repository global state. Signed-off-by: Shreyansh Paliwal <shreyanshpaliwalcmsmn@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'compat/writev.c')
0 files changed, 0 insertions, 0 deletions