prompt: clean up strbuf usage
authorJeff King <peff@peff.net>
Fri, 3 Feb 2012 22:14:11 +0000 (17:14 -0500)
committerJunio C Hamano <gitster@pobox.com>
Fri, 3 Feb 2012 22:37:02 +0000 (14:37 -0800)
The do_askpass function inherited a few bad habits from the
original git_getpass. One, there's no need to strbuf_reset a
buffer which was just initialized. And two, it's a good
habit to use strbuf_detach to claim ownership of a buffer's
string (even though in this case the owning buffer goes out
of scope, so it's effectively the same thing).

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
No differences found