Commit adca367
committed
refactor(git): reuse _git_sources_pinned_sha1 helper in fetch_from_repo
fetch_from_repo() carried its own copy of the pinned-SHA lookup from
memoized_git_ref_to_info(), with the same shell-interpolated jq program
(source/branch concatenated into the filter text). Replace it with the
shared _git_sources_pinned_sha1 helper added earlier in this branch,
which passes values through jq --arg, and validate the pinned SHA before
overriding fetched_revision so a malformed pin fails loudly instead of
silently — matching the branch path in git-ref2info.sh.
Pure code cleanup: removes the last duplicated jq-injection of this lookup.
Assisted-by: Claude:claude-opus-4.81 parent 6ea7313 commit adca367
1 file changed
Lines changed: 10 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
252 | 252 | | |
253 | 253 | | |
254 | 254 | | |
255 | | - | |
256 | | - | |
257 | | - | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
258 | 263 | | |
259 | 264 | | |
260 | 265 | | |
| |||
279 | 284 | | |
280 | 285 | | |
281 | 286 | | |
282 | | - | |
283 | | - | |
| 287 | + | |
| 288 | + | |
284 | 289 | | |
285 | 290 | | |
286 | 291 | | |
| |||
0 commit comments