diff options
author | Jeff King <peff@peff.net> | 2013-09-28 04:35:25 -0400 |
---|---|---|
committer | Jonathan Nieder <jrnieder@gmail.com> | 2013-10-14 17:01:15 -0700 |
commit | b227bbc43a568b282b5f8cb35e563d00d60b272d (patch) | |
tree | 49d40f0b923fdcea9c7ef770dff333732365edc7 /test-read-cache.c | |
parent | remote-curl: make refs_url a strbuf (diff) | |
download | tgif-b227bbc43a568b282b5f8cb35e563d00d60b272d.tar.xz |
remote-curl: store url as a strbuf
We use a strbuf to generate the string containing the remote
URL, but then detach it to a bare pointer. This makes it
harder to later manipulate the URL, as we have forgotten the
length (and the allocation semantics are not as clear).
Let's instead keep the strbuf around. As a bonus, this
eliminates a confusing double-use of the "buf" strbuf in
main(). Prior to this, it was used both for constructing the
url, and for reading commands from stdin.
The downside is that we have to update each call site to
refer to "url.buf" rather than just "url" when they want the
C string.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Diffstat (limited to 'test-read-cache.c')
0 files changed, 0 insertions, 0 deletions