On Wed, Dec 12, 2018 at 3:02 AM Jeff King wrote:
>
> On Tue, Dec 11, 2018 at 04:25:15PM -0800, Josh Steadmon wrote:
>
> > From: Masaya Suzuki
> >
> > In the Git pack protocol definition, an error packet may appear only in
> > a certain context. However, servers c
By using and sharing a packet_reader while handling a Git pack protocol
request, the same reader option is used throughout the code. This makes
it easy to set a reader option to the request parsing code.
Signed-off-by: Masaya Suzuki
---
builtin/archive.c | 19 ++---
builtin/receive
Without -Wformat, -Wformat-security won't work.
> cc1: error: -Wformat-security ignored without -Wformat
> [-Werror=format-security]
Signed-off-by: Masaya Suzuki
---
config.mak.dev | 1 +
1 file changed, 1 insertion(+)
diff --git a/config.mak.dev b/config.mak.dev
index bbeeff44f
On Thu, Dec 27, 2018 at 10:36 AM Duy Nguyen wrote:
>
> On Thu, Dec 27, 2018 at 7:18 PM Masaya Suzuki wrote:
> >
> > Without -Wformat, -Wformat-security won't work.
> >
> > > cc1: error: -Wformat-security ignored without -Wformat
> > > [-Werror
a request with CURLOPT_FAILONERROR, and libcurl won't call the
callback if the response has an error status code.
Signed-off-by: Masaya Suzuki
---
http.c| 99 +--
remote-curl.c | 29 ---
2 files changed, 81 insertions(+
y for non-OK responses.
This is substantially same as setting http_options.keep_error to all
requests. Hence, removing this option.
Signed-off-by: Masaya Suzuki
---
http.c | 4
http.h | 1 -
remote-curl.c| 1 -
t/lib-httpd/apache
On Fri, Dec 28, 2018 at 11:37 AM Eric Sunshine wrote:
>
> On Thu, Dec 27, 2018 at 8:47 PM Masaya Suzuki wrote:
> > When GIT_CURL_VERBOSE is set, libcurl produces request/response headers
> > to stderr. However, if the response is an error response and
> > CURLOPT_FAI
On Fri, Dec 28, 2018 at 11:58 AM Eric Sunshine wrote:
>
> On Fri, Dec 28, 2018 at 2:51 PM Masaya Suzuki wrote:
> > On Fri, Dec 28, 2018 at 11:37 AM Eric Sunshine
> > wrote:
> > > On Thu, Dec 27, 2018 at 8:47 PM Masaya Suzuki
> > > wrote:
> > >
y for non-OK responses.
To this end, the caller of libcurl needs to handle HTTP request failures by
themselves. The first patch makes git prepared to handle those failures. The
second patch actually unsets CURLOPT_FAILONERROR.
Masaya Suzuki (2):
Change how HTTP response body is returned
a request with CURLOPT_FAILONERROR, and libcurl won't call the
callback if the response has an error status code.
Signed-off-by: Masaya Suzuki
---
http.c| 99 +--
remote-curl.c | 29 ---
2 files changed, 81 insertions(+
y for non-OK responses.
This is substantially same as setting http_options.keep_error to all
requests. Hence, remove this option.
Signed-off-by: Masaya Suzuki
---
http.c | 4
http.h | 1 -
remote-curl.c| 1 -
t/lib-httpd/apache
Sorry. This is really broken. I'll fix the tests and send another version.
not a part of
Git protocol, it's possible that a packet that is not supposed to be an
error packet is mistakenly parsed as an error packet. This error packet
handling is enabled only for the Git pack protocol parsing code
considering this.
Signed-off-by: Masaya Suzuki
---
Documentation/tech
By using and sharing a packet_reader while handling a Git pack protocol
request, the same reader option is used throughout the code. This makes
it easy to set a reader option to the request parsing code.
Signed-off-by: Masaya Suzuki
---
builtin/archive.c | 19 ++---
builtin/receive
.ge37...@google.com/
Masaya Suzuki (2):
Use packet_reader instead of packet_read_line
pack-protocol.txt: accept error packets in any context
Documentation/technical/pack-protocol.txt | 20 +++
builtin/archive.c | 19 +++
builtin/fetch-pack.c
On Thu, Jan 3, 2019 at 3:05 PM Junio C Hamano wrote:
>
> Masaya Suzuki writes:
>
> > This makes it possible for servers to send an error message back to clients
> > in
> > an arbitrary situation.
> >
> > The first patch was originally sent in [1]. This
On Fri, Jan 4, 2019 at 2:49 AM Jeff King wrote:
>
> On Sat, Dec 29, 2018 at 11:44:47AM -0800, Masaya Suzuki wrote:
>
> > When GIT_CURL_VERBOSE is set, libcurl produces request/response headers
> > to stderr. However, if the response is an error response and
> > CURLOPT_
By not setting CURLOPT_FAILONERROR, curl parses the HTTP response
headers even if the response is an error. This makes GIT_CURL_VERBOSE to
show the HTTP headers, which is useful for debugging.
Signed-off-by: Masaya Suzuki
---
remote-curl.c | 10 ++
1 file changed, 10 insertions(+)
diff
HTTP_KEEP_ERROR makes it easy to debug HTTP transport errors. In order
to make HTTP_KEEP_ERROR enabled for all requests, file handles need to
be supported.
Signed-off-by: Masaya Suzuki
---
http.c | 9 ++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/http.c b/http.c
index
-masayasuz...@google.com/
[2]: https://public-inbox.org/git/20190104101149.ga26...@sigill.intra.peff.net/
[3]: https://public-inbox.org/git/20190104104907.gc26...@sigill.intra.peff.net/
Masaya Suzuki (5):
http: support file handles for HTTP_KEEP_ERROR
http: enable keep_error for HTTP requests
r
In order to pass more values for rpc_in, define a struct and pass it as
an additional value.
Signed-off-by: Masaya Suzuki
---
remote-curl.c | 18 ++
1 file changed, 14 insertions(+), 4 deletions(-)
diff --git a/remote-curl.c b/remote-curl.c
index d8eda2380a..d4673b6e8c 100644
HTTP
response headers, and they're shown if GIT_CURL_VERBOSE is set.
Signed-off-by: Masaya Suzuki
---
http.c| 30 +-
http.h| 1 -
remote-curl.c | 1 -
3 files changed, 13 insertions(+), 19 deletions(-)
diff --git a/http.c b/http.c
index 06450
This tests GIT_CURL_VERBOSE shows an error when an URL returns 500. This
exercises the code in remote_curl.
Signed-off-by: Masaya Suzuki
---
t/lib-httpd/apache.conf | 1 +
t/t5581-http-curl-verbose.sh | 28
2 files changed, 29 insertions(+)
create mode 100755
On Mon, Jan 7, 2019 at 2:33 PM Josh Steadmon wrote:
>
> On 2018.12.29 13:19, Masaya Suzuki wrote:
> > By using and sharing a packet_reader while handling a Git pack protocol
> > request, the same reader option is used throughout the code. This makes
> > it easy to se
HTTP
response headers, and they're shown if GIT_CURL_VERBOSE is set.
Signed-off-by: Masaya Suzuki
---
http.c| 42 +++---
http.h| 1 -
remote-curl.c | 1 -
3 files changed, 19 insertions(+), 25 deletions(-)
diff --git a/http.c b/http.c
HTTP_KEEP_ERROR makes it easy to debug HTTP transport errors. In order
to make HTTP_KEEP_ERROR enabled for all requests, file handles need to
be supported.
Signed-off-by: Masaya Suzuki
---
http.c | 16 +---
1 file changed, 13 insertions(+), 3 deletions(-)
diff --git a/http.c b
Diff from v3[1]:
* Handle ftruncate and fflush return values
* Call rewind to set the position back
[1]:
https://public-inbox.org/git/20190108024741.62176-1-masayasuz...@google.com/
Masaya Suzuki (5):
http: support file handles for HTTP_KEEP_ERROR
http: enable keep_error for HTTP
This tests GIT_CURL_VERBOSE shows an error when an URL returns 500. This
exercises the code in remote_curl.
Signed-off-by: Masaya Suzuki
---
t/lib-httpd/apache.conf | 1 +
t/t5581-http-curl-verbose.sh | 28
2 files changed, 29 insertions(+)
create mode 100755
In order to pass more values for rpc_in, define a struct and pass it as
an additional value.
Signed-off-by: Masaya Suzuki
---
remote-curl.c | 18 ++
1 file changed, 14 insertions(+), 4 deletions(-)
diff --git a/remote-curl.c b/remote-curl.c
index d8eda2380a..d4673b6e8c 100644
By not setting CURLOPT_FAILONERROR, curl parses the HTTP response
headers even if the response is an error. This makes GIT_CURL_VERBOSE to
show the HTTP headers, which is useful for debugging.
Signed-off-by: Masaya Suzuki
---
remote-curl.c | 10 ++
1 file changed, 10 insertions(+)
diff
per should not be cached. If this is
specified, even after the credential is used successfully, it won't be
announced to other helpers for store.
Signed-off-by: Masaya Suzuki
---
Documentation/technical/api-credentials.txt | 4 +++-
credential.c| 4 +++
On Tue, Jul 9, 2019 at 5:56 AM Jeff King wrote:
>
> On Sat, Jul 06, 2019 at 10:51:32PM -0700, Masaya Suzuki wrote:
>
> > The credentials API calls credentials helpers in order. If a
> > username/password pair is returned the helpers and if it's used for
> > a
change, the error packet handling code is
moved to pkt-line.c.
Signed-off-by: Masaya Suzuki
---
Documentation/technical/pack-protocol.txt | 20 +++-
builtin/archive.c | 2 --
connect.c | 2 --
fetch-pack.c
On Thu, Nov 29, 2018 at 3:42 AM Junio C Hamano wrote:
>
> Masaya Suzuki writes:
>
> > In the Git pack protocol definition, an error packet may appear only in
> > a certain context. However, servers can face a runtime error (e.g. I/O
> > error) at an arbitrary tim
builtin/send-pack didn't call git_default_config, and because of this
git push --signed didn't respect the username and email in gitconfig in
the HTTP transport.
Signed-off-by: Masaya Suzuki
---
builtin/send-pack.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/bu
Unlike ref advertisement, client capabilities and the first want are
separated by SP, not NUL, in the implementation. Fix the documentation
to align with the implementation. pack-protocol.txt is already fixed.
Signed-off-by: Masaya Suzuki
---
Documentation/technical/http-protocol.txt | 4
refs' OIDs.
Signed-off-by: Masaya Suzuki
---
builtin/fetch.c | 18 ++
1 file changed, 10 insertions(+), 8 deletions(-)
diff --git a/builtin/fetch.c b/builtin/fetch.c
index 54d6b01892..51a276dfaa 100644
--- a/builtin/fetch.c
+++ b/builtin/fetch.c
@@ -7,6 +7,7 @@
#include &qu
peeds up this process by using oid_set.
Now the client can send a fetch request almost immediately.
Masaya Suzuki (1):
fetch: Cache the want OIDs for faster lookup
builtin/fetch.c | 18 ++
1 file changed, 10 insertions(+), 8 deletions(-)
--
2.23.0.237.gc6a4ce50a0-goog
On Mon, Aug 26, 2019 at 9:28 AM Junio C Hamano wrote:
>
> Jeff King writes:
>
> > I was thinking that Git itself could treat "ttl=0" specially, the same
> > as your nocache, and avoid passing it along to any helpers during the
> > approve stage. That would make it exactly equivalent to your patch
On Sun, Sep 15, 2019 at 7:35 PM Derrick Stolee wrote:
>
> On 9/15/2019 5:18 PM, Masaya Suzuki wrote:
> > During git-fetch, the client checks if the advertised tags' OIDs are
> > already in the fetch request's want OID set. This check is done in a
> > linear sca
40 matches
Mail list logo