1
0
mirror of https://github.com/git/git synced 2024-06-30 22:54:27 +00:00
git/contrib/credential
Koji Nakamaru e1ab45b2da osxkeychain: state to skip unnecessary store operations
git passes a credential that has been used successfully to the helpers
to record. If a credential is already stored,
"git-credential-osxkeychain store" just records the credential returned
by "git-credential-osxkeychain get", and unnecessary (sometimes
problematic) SecItemAdd() and/or SecItemUpdate() are performed.

We can skip such unnecessary operations by marking a credential returned
by "git-credential-osxkeychain get". This marking can be done by
utilizing the "state[]" feature:

- The "get" command sets the field "state[]=osxkeychain:seen=1".

- The "store" command skips its actual operation if the field
  "state[]=osxkeychain:seen=1" exists.

Introduce a new state "state[]=osxkeychain:seen=1".

Suggested-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Koji Nakamaru <koji.nakamaru@gree.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2024-05-15 14:02:45 -07:00
..
libsecret libsecret: retrieve empty password 2024-02-19 14:36:35 -08:00
netrc netrc: ignore unknown lines (do not die) 2022-09-22 14:20:59 -07:00
osxkeychain osxkeychain: state to skip unnecessary store operations 2024-05-15 14:02:45 -07:00
wincred Merge branch 'mh/credential-oauth-refresh-token-with-wincred' 2024-02-08 13:20:34 -08:00