Affects git-credential-himitsu, since git uses its credential helpers to inserts any keys that it uses back into the store, creating a new duplicate on each run.
I would like to try an address this. Does simply yielding the same result that is returned for non-duplicates sound good, or would you prefer a dedicated error response?
Probably needs an error, since we have to assume
are the same key
What would the mechanic to update an existing key? Could we have a flag to insert-or-update?
A flag would probably be good, yeah.
I've a WIP changes for this here, but am missing the most important parts in
Some early questions before proceeding:
- For a duplicate entry, should I add a new error type to
- When the
updateflag is provided, is deleted-then-insert okay? I think it's much simpler than implementing rewriting at a lower layer.
- Should we prompt users to confirm updates?
- In case the
-uflag (update) is provided, and no matching entry exists: should I fail, or simply proceed with insertion?
fail, unless -au are both provided
Oh, so I guess it should be possible to specify
-a. I had not accounted for that.