summaryrefslogtreecommitdiff
path: root/builtin/show-branch.c
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2013-09-28 04:35:25 -0400
committerJonathan Nieder <jrnieder@gmail.com>2013-10-14 17:01:15 -0700
commitb227bbc43a568b282b5f8cb35e563d00d60b272d (patch)
tree49d40f0b923fdcea9c7ef770dff333732365edc7 /builtin/show-branch.c
parentc65d5692cd3434133c2e8f1a20074a261e0267f0 (diff)
downloadgit-b227bbc43a568b282b5f8cb35e563d00d60b272d.tar.gz
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 'builtin/show-branch.c')
0 files changed, 0 insertions, 0 deletions