Re: [PATCH/RFC 3/6] http-backend: handle refspec argument
From: David Turner <hidden>
Date: 2016-06-16 02:18:51
On Sat, 2016-04-16 at 21:51 -0400, Eric Sunshine wrote:
On Fri, Apr 15, 2016 at 3:19 PM, David Turner < dturner@twopensource.com> wrote:quoted
+ if (refspec) { + struct strbuf interesting_refs = STRBUF_INIT; + strbuf_addstr(&interesting_refs, "- -interesting-refs="); + strbuf_addstr(&interesting_refs, refspec); + argv_array_push(&argv, interesting_refs.buf); + strbuf_release(&interesting_refs); + }if (refspec) argv_array_pushf(&interesting_refs, "--interesting-refs=%s", refspec);
Will fix, thanks.
quoted
argv_array_push(&argv, "."); run_service(argv.argv, 0); argv_array_clear(&argv);@@ -841,6 +905,19 @@ int main(int argc, char **argv) + if (starts_with(arg, "--interesting-refs=")) {... + continue; + }Is this leaking the string list?
Yes, intentionally. interesting_refspec is a global that we look at later.