git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Question about credential api
@ 2012-03-01 13:33 ` Nelson Benitez Leon
  2012-03-01 20:44   ` Jeff King
  0 siblings, 1 reply; 3+ messages in thread
From: Nelson Benitez Leon @ 2012-03-01 13:33 UTC (permalink / raw)
  To: git; +Cc: peff

Hi Jeff, a quick question about credential api, after doing this:

static struct credential proxy_auth = CREDENTIAL_INIT;
credential_from_url(&proxy_auth, "http://proxy.server.com:8080");

will prox_auth.username and prox_auth.password be an empty string ? so
that strcmp(proxy_auth.username,"") returns zero.. couldn't figure that
out from api-credentials.txt 

Thanks,

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Question about credential api
@ 2012-03-01 14:34 Nelson Benitez Leon
  2012-03-01 13:33 ` Nelson Benitez Leon
  0 siblings, 1 reply; 3+ messages in thread
From: Nelson Benitez Leon @ 2012-03-01 14:34 UTC (permalink / raw)
  To: git; +Cc: peff

Ok don't bother, I've already checked and seems to return NULL
 in this case.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Question about credential api
  2012-03-01 13:33 ` Nelson Benitez Leon
@ 2012-03-01 20:44   ` Jeff King
  0 siblings, 0 replies; 3+ messages in thread
From: Jeff King @ 2012-03-01 20:44 UTC (permalink / raw)
  To: Nelson Benitez Leon; +Cc: git

On Thu, Mar 01, 2012 at 02:33:08PM +0100, Nelson Benitez Leon wrote:

> static struct credential proxy_auth = CREDENTIAL_INIT;
> credential_from_url(&proxy_auth, "http://proxy.server.com:8080");
> 
> will prox_auth.username and prox_auth.password be an empty string ? so
> that strcmp(proxy_auth.username,"") returns zero.. couldn't figure that
> out from api-credentials.txt 
> [...]
> Ok don't bother, I've already checked and seems to return NULL
>  in this case.

Right. It is NULL, which translates to "we don't know yet and it needs
to be filled in during credential_fill".

-Peff

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-03-01 20:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-01 14:34 Question about credential api Nelson Benitez Leon
2012-03-01 13:33 ` Nelson Benitez Leon
2012-03-01 20:44   ` Jeff King

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).