diff options
| author | Shreyansh Paliwal <shreyanshpaliwalcmsmn@gmail.com> | 2026-03-17 21:20:29 +0530 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2026-03-17 09:27:13 -0700 |
| commit | 3cfe355ca74aae5cf90a4eca73a341732b0eb456 (patch) | |
| tree | 82ab35ab20bbda276f6f71662a2bb3db672ace17 /Documentation | |
| parent | ca1db8a0f7dc0dbea892e99f5b37c5fe5861be71 (diff) | |
| download | git-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 'Documentation')
0 files changed, 0 insertions, 0 deletions
