return found_credential;
}
- while (strbuf_getline(&line, fh, '\n') != EOF) {
+ while (strbuf_getline_lf(&line, fh) != EOF) {
credential_from_url(&entry, line.buf);
if (entry.username && entry.password &&
credential_match(c, &entry)) {
print_line(extra);
parse_credential_file(fn, c, NULL, print_line);
if (commit_lock_file(&credential_lock) < 0)
- die_errno("unable to write credential store: %s",
- strerror(errno));
+ die_errno("unable to write credential store");
}
static void store_credential_file(const char *fn, struct credential *c)
return; /* Found credential */
}
-int main(int argc, char **argv)
+int cmd_main(int argc, const char **argv)
{
const char * const usage[] = {
"git credential-store [<options>] <action>",