Re: [PATCH] git-send-email: add ~/.authinfo parsing
From: Ted Zlatanov <hidden>
Date: 2016-06-15 22:56:04
On Wed, 06 Feb 2013 17:41:01 +0100 Matthieu Moy [off-list ref] wrote: MM> Ted Zlatanov [off-list ref] writes:
quoted
- sort the output tokens (after 'url' is extracted) so the output is consistent and testable
MM> Why not, if you want to use the output of credential_write in tests. But MM> credential_write is essentially used to talk to "git credential", so the MM> important information is the content of the hash before credential_write MM> and after credential_read. They are unordered, but consistent and MM> testable. I like testing output (especially when it's part of an API), so we should make the externally observable output consistent and testable. The change is tiny, just sort the keys instead of calling each(), so I hope it makes it in the final version.
quoted
Yup. But what you call "read" and "write" are, to the credential helper, "write" and "read" but it's the same protocol :) So maybe the names should be changed to reflect that, e.g. "query" and "response."
MM> I don't think that would be a better naming. Maybe "serialize" and MM> "parse" would be better, but "query" would sound like it establishes the MM> connection and possibly reads the response to me. I'm OK with anything unambiguous. Thanks! Ted