summaryrefslogtreecommitdiff
path: root/builtin/credential.c
diff options
context:
space:
mode:
authorMatthieu Moy <Matthieu.Moy@imag.fr>2012-06-24 11:40:00 (GMT)
committerJunio C Hamano <gitster@pobox.com>2012-06-25 18:56:24 (GMT)
commit2d6dc182b8fa171a6b283ce6e8e75a35e13ea67a (patch)
tree8f2e6170136cf7a4a63b8ef6083327e91c8c4fae /builtin/credential.c
parente30b2feb1b50c2d14d32dc3e6e41f7b20a677ff2 (diff)
downloadgit-2d6dc182b8fa171a6b283ce6e8e75a35e13ea67a.zip
git-2d6dc182b8fa171a6b283ce6e8e75a35e13ea67a.tar.gz
git-2d6dc182b8fa171a6b283ce6e8e75a35e13ea67a.tar.bz2
git credential fill: output the whole 'struct credential'
Instead of outputing only the username and password, print all the attributes, even those that already appeared in the input. This is closer to what the C API does, and allows one to take the exact output of "git credential fill" as input to "git credential approve" or "git credential reject". Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/credential.c')
-rw-r--r--builtin/credential.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/builtin/credential.c b/builtin/credential.c
index c185c07..0412fa0 100644
--- a/builtin/credential.c
+++ b/builtin/credential.c
@@ -19,10 +19,7 @@ int cmd_credential(int argc, const char **argv, const char *prefix)
if (!strcmp(op, "fill")) {
credential_fill(&c);
- if (c.username)
- printf("username=%s\n", c.username);
- if (c.password)
- printf("password=%s\n", c.password);
+ credential_write(&c, stdout);
} else if (!strcmp(op, "approve")) {
credential_approve(&c);
} else if (!strcmp(op, "reject")) {