refactor: migrate credential consumers to git_credential

Problem: `credentials.lua`, `submit.lua`, and `scraper.lua` all
routed through `cache.get/set/clear_credentials`, which no longer
exists.

Solution: replace all `cache` credential calls with direct
`git_credential.get/store/reject` calls. Remove unused `cache`
imports where applicable.
This commit is contained in:
Barrett Ruth 2026-03-07 19:46:32 -05:00
parent be1bc2095e
commit d1127f3e9b
Signed by: barrett
GPG key ID: A6C96C9349D2FC81
3 changed files with 15 additions and 14 deletions

View file

@ -347,7 +347,7 @@ function M.login(platform, credentials, on_status, callback)
stdin = vim.json.encode(credentials),
on_event = function(ev)
if ev.credentials ~= nil and next(ev.credentials) ~= nil then
require('cp.cache').set_credentials(platform, ev.credentials)
require('cp.git_credential').store(platform, ev.credentials)
end
if ev.status ~= nil then
if type(on_status) == 'function' then
@ -395,7 +395,7 @@ function M.submit(
stdin = vim.json.encode(credentials),
on_event = function(ev)
if ev.credentials ~= nil and next(ev.credentials) ~= nil then
require('cp.cache').set_credentials(platform, ev.credentials)
require('cp.git_credential').store(platform, ev.credentials)
end
if ev.status ~= nil then
if type(on_status) == 'function' then