Re: [PATCH v2 2/3] replace CURLOPT_FILE With CURLOPT_WRITEDATA
- From
Sean McAllister <smcallis@google.com>
- Date
- Oct 14, 2020, 14:29 UTC
- Message-ID
- <CAM4o00cFdD2mcnm8SmupTSrWeetUN+pC_ZFNQijdia6uGGpYPQ@mail.gmail.com>
- In-Reply-To
- <xmqq7drtkg6o.fsf@gitster.c.googlers.com>
Show 11 quoted lines
> > Sean McAllister <smcallis@google.com> writes: > > > CURLOPT_FILE has been deprecated since 2003. > > I thought that Dscho already mention this, but updating the above > description to mention that _WRITEDATA was introduce to overtake > _FILE as an equivalent in the same timeframe would be more helpful > to readers. > >
Yes he did, I'll update the commit message to give more history on the change and why it's safe.
Show 19 quoted lines
> > Signed-off-by: Sean McAllister <smcallis@google.com> > > --- > > http-push.c | 6 +++--- > > http-walker.c | 2 +- > > http.c | 6 +++--- > > remote-curl.c | 4 ++-- > > 4 files changed, 9 insertions(+), 9 deletions(-) > > > > diff --git a/http-push.c b/http-push.c > > index 6a4a43e07f..2e6fee3305 100644 > > --- a/http-push.c > > +++ b/http-push.c > > @@ -894,7 +894,7 @@ static struct remote_lock *lock_remote(const char *path, long timeout) > > slot->results = &results; > > curl_setup_http(slot->curl, url, DAV_LOCK, &out_buffer, fwrite_buffer); > > curl_easy_setopt(slot->curl, CURLOPT_HTTPHEADER, dav_headers); > > - curl_easy_setopt(slot->curl, CURLOPT_FILE, &in_buffer); > > + curl_easy_setopt(slot->curl, CURLOPT_WRITEDATA, &in_buffer); > > ...