diff options
| author | Patrick Steinhardt <ps@pks.im> | 2026-07-16 14:38:03 +0200 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2026-07-16 13:58:25 -0700 |
| commit | bb71c3f19e6a693fc1d32e4448be8520132d946e (patch) | |
| tree | 4034fc6906f95bfd48f99b43bea61a32a152ea6a /t/t4013/diff.diff_initial..side | |
| parent | 991ec2741d723d0737bd5410f01b7f98b89d9186 (diff) | |
refspec: let callers pass in hash algorithm when parsing items
When parsing a refspec item we need to know about the hash algorithm
used by the repository so that we can decide whether or not a given
string is an exact object ID. We use `the_hash_algo` for this, which
makes the code implicitly depend on `the_repository`.
Refactor `refspec_item_init_fetch()`, `refspec_item_init_push()` and
`valid_fetch_refspec()` so that callers have to pass in the hash
algorithm explicitly and adapt callers accordingly. For now, all of
the callers simply pass `the_hash_algo`, so there is no change in
behaviour.
Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t4013/diff.diff_initial..side')
0 files changed, 0 insertions, 0 deletions
