# [PATCH] doc: define timestamp in pack protocol grammar

2 messages from 2026-01-04 to 2026-01-04. Participants: Heath Dutton🕴️ via GitGitGadget, Junio C Hamano.
Thread: https://gitlist.dev/t/64716

## Heath Dutton🕴️ via GitGitGadget, 2026-01-04 03:08

Subject: [PATCH] doc: define timestamp in pack protocol grammar
Message-ID: <pull.2154.git.git.1767496120852.gitgitgadget@gmail.com>
URL: https://gitlist.dev/e/pull.2154.git.git.1767496120852.gitgitgadget%40gmail.com

```
From: =?UTF-8?q?Heath=20Dutton=F0=9F=95=B4=EF=B8=8F?=
 <heathdutton@gmail.com>

The grammar for depth-request uses 'timestamp' but never defines it,
unlike 'depth' which is properly defined as '1*DIGIT'. Add the missing
definition.

Signed-off-by: Heath Dutton <heathdutton@gmail.com>
---
    doc: define timestamp in pack protocol grammar
    
    Fixes https://git.issues.gerritcodereview.com/issues/40000018

Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-2154%2Fheathdutton%2Fhd%2Fdoc-protocol-timestamp-40000018-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-2154/heathdutton/hd/doc-protocol-timestamp-40000018-v1
Pull-Request: https://github.com/git/git/pull/2154

 Documentation/gitprotocol-pack.adoc | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/gitprotocol-pack.adoc b/Documentation/gitprotocol-pack.adoc
index 837b691c89..7ad63322c2 100644
--- a/Documentation/gitprotocol-pack.adoc
+++ b/Documentation/gitprotocol-pack.adoc
@@ -273,6 +273,7 @@ out of what the server said it could do with the first 'want' line.
   additional-want   =  PKT-LINE("want" SP obj-id)
 
   depth             =  1*DIGIT
+  timestamp         =  1*DIGIT
 
   filter-request    =  PKT-LINE("filter" SP filter-spec)
 ----

base-commit: 68cb7f9e92a5d8e9824f5b52ac3d0a9d8f653dbe
-- 
gitgitgadget

```

## Junio C Hamano, 2026-01-04 06:28

Subject: Re: [PATCH] doc: define timestamp in pack protocol grammar
Message-ID: <xmqqv7hhnb76.fsf@gitster.g>
URL: https://gitlist.dev/e/xmqqv7hhnb76.fsf%40gitster.g
In-Reply-To: <pull.2154.git.git.1767496120852.gitgitgadget@gmail.com>

```
"Heath Dutton🕴️ via GitGitGadget" <gitgitgadget@gmail.com> writes:

> From: =?UTF-8?q?Heath=20Dutton=F0=9F=95=B4=EF=B8=8F?=
>  <heathdutton@gmail.com>

This name is expected to be identical to ...

> The grammar for depth-request uses 'timestamp' but never defines it,
> unlike 'depth' which is properly defined as '1*DIGIT'. Add the missing
> definition.
>
> Signed-off-by: Heath Dutton <heathdutton@gmail.com>

... what we have here.  There is something weird going on after the
name before the e-mail on the in-body From: line, though?

> Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-2154%2Fheathdutton%2Fhd%2Fdoc-protocol-timestamp-40000018-v1
> Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-2154/heathdutton/hd/doc-protocol-timestamp-40000018-v1
> Pull-Request: https://github.com/git/git/pull/2154
>
>  Documentation/gitprotocol-pack.adoc | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/Documentation/gitprotocol-pack.adoc b/Documentation/gitprotocol-pack.adoc
> index 837b691c89..7ad63322c2 100644
> --- a/Documentation/gitprotocol-pack.adoc
> +++ b/Documentation/gitprotocol-pack.adoc
> @@ -273,6 +273,7 @@ out of what the server said it could do with the first 'want' line.
>    additional-want   =  PKT-LINE("want" SP obj-id)
>  
>    depth             =  1*DIGIT
> +  timestamp         =  1*DIGIT

OK.

It was added at 569e554b (upload-pack: add deepen-since to cut
shallow repos based on time, 2016-06-12) by Duy for deepen-since
which is parsed using parse_timestamp() that is a fancier name for
strtoumax(), so 1*DIGIT sounds fine.

Thanks.

```
