summaryrefslogtreecommitdiff
path: root/parse-options-cb.c
diff options
context:
space:
mode:
authorLibravatar Jeff King <peff@peff.net>2013-09-28 04:35:25 -0400
committerLibravatar Jonathan Nieder <jrnieder@gmail.com>2013-10-14 17:01:15 -0700
commitb227bbc43a568b282b5f8cb35e563d00d60b272d (patch)
tree49d40f0b923fdcea9c7ef770dff333732365edc7 /parse-options-cb.c
parentremote-curl: make refs_url a strbuf (diff)
downloadtgif-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 'parse-options-cb.c')
0 files changed, 0 insertions, 0 deletions