diff mbox series

[v13,05/13] reftable: clarify how empty tables should be written

Message ID 7aa3f92fca0c33eced848d560272d0b948fd5cf3.1589226388.git.gitgitgadget@gmail.com (mailing list archive)
State New, archived
Headers show
Series Reftable support git-core | expand

Commit Message

Linus Arver via GitGitGadget May 11, 2020, 7:46 p.m. UTC
From: Han-Wen Nienhuys <hanwen@google.com>

The format allows for some ambiguity, as a lone footer also starts
with a valid file header. However, the current JGit code will barf on
this. This commit codifies this behavior into the standard.

Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
---
 Documentation/technical/reftable.txt | 7 +++++++
 1 file changed, 7 insertions(+)

Comments

Junio C Hamano May 19, 2020, 10:01 p.m. UTC | #1
"Han-Wen Nienhuys via GitGitGadget" <gitgitgadget@gmail.com> writes:

> From: Han-Wen Nienhuys <hanwen@google.com>
>
> The format allows for some ambiguity, as a lone footer also starts
> with a valid file header. However, the current JGit code will barf on
> this. This commit codifies this behavior into the standard.

Nice to see the documentation being careful.

>
> Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
> ---
>  Documentation/technical/reftable.txt | 7 +++++++
>  1 file changed, 7 insertions(+)
>
> diff --git a/Documentation/technical/reftable.txt b/Documentation/technical/reftable.txt
> index 8bad9ade256..6223538d64e 100644
> --- a/Documentation/technical/reftable.txt
> +++ b/Documentation/technical/reftable.txt
> @@ -715,6 +715,13 @@ version)
>  
>  Once verified, the other fields of the footer can be accessed.
>  
> +Empty tables
> +++++++++++++
> +
> +A reftable may be empty. In this case, the file starts with a header
> +and is immediately followed by a footer.
> +
> +
>  Varint encoding
>  ^^^^^^^^^^^^^^^
diff mbox series

Patch

diff --git a/Documentation/technical/reftable.txt b/Documentation/technical/reftable.txt
index 8bad9ade256..6223538d64e 100644
--- a/Documentation/technical/reftable.txt
+++ b/Documentation/technical/reftable.txt
@@ -715,6 +715,13 @@  version)
 
 Once verified, the other fields of the footer can be accessed.
 
+Empty tables
+++++++++++++
+
+A reftable may be empty. In this case, the file starts with a header
+and is immediately followed by a footer.
+
+
 Varint encoding
 ^^^^^^^^^^^^^^^