git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Protocol v2: The wrong --shallow-since time format causes git to wait indefinitely

From
FForce.Charlie <force@forcemz.net>
Date
Nov 13, 2019, 01:00 UTC
Message-ID
<tencent_AB1A7466D1F2EF9A84B437705F06A7652709@qq.com>
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
Next: Junio C Hamano
Message 1 of 4 in “Protocol v2: The wrong --shallow-since time format causes git to wait indefinitely”
  1. Force.CharlieNov 13, 2019
  2. Junio C HamanoNov 13, 2019
  3. Denton LiuNov 19, 2019
  4. Denton LiuNov 19, 2019

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.