git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Protocol v2: The wrong --shallow-since time format causes git to wait indefinitely
@ 2019-11-13  1:00 =?gb18030?B?Rm9yY2UuQ2hhcmxpZQ==?=
  2019-11-13  3:42 ` Junio C Hamano
  2019-11-19 23:46 ` Denton Liu
  0 siblings, 2 replies; 4+ messages in thread
From: =?gb18030?B?Rm9yY2UuQ2hhcmxpZQ==?= @ 2019-11-13  1:00 UTC (permalink / raw)
  To: =?gb18030?B?Z2l0?=

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="gb18030", Size: 1248 bytes --]

Recently, when I tested my Git Over HTTP server, I found a bug in Git. When we used git -c protocol.version=2 clone --shallow-since , if the time format is wrong, it will cause git to wait indefinitely.

Github supports Wire Protocol to reproduce, Gitlab does not support it and does not reproduce it.

The commands that can be retried are as follows:

```shell
# time format wrong
git -c protocol.version=2 clone https://github.com/git/git.git --shallow-since=20151012
# trace
GIT_TRACE=1 GIT_CURL_VERBOSE=1 GIT_TRACE_PACKET=2 git -c protocol.version=2 clone https://github.com/git/git.git --shallow-since=20151012
```
We can see that the server closes the HTTP connection after sending the `shallow-info\n` message, and git-remote-http(s) is still waiting.

```
$ git --version --build-options
git version 2.24.0
cpu: x86_64
no commit associated with this build
sizeof-long: 8
sizeof-size_t: 8

```

When the time format is correct, the clone is successful, so this is followed by the shallow-list£º

```shell
GIT_TRACE=1 GIT_CURL_VERBOSE=1 GIT_TRACE_PACKET=2 git -c protocol.version=2 clone https://github.com/git/git.git --shallow-since=2015-10-12
```

Github Issues: https://github.com/gitgitgadget/git/issues/457

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-11-19 23:46 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-11-13  1:00 Protocol v2: The wrong --shallow-since time format causes git to wait indefinitely =?gb18030?B?Rm9yY2UuQ2hhcmxpZQ==?=
2019-11-13  3:42 ` Junio C Hamano
2019-11-19 23:36   ` Denton Liu
2019-11-19 23:46 ` Denton Liu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).