Subject: Re: [PATCH v3 3/8] fast-import: allow unquoted empty path for root

From: Junio C Hamano <[email-masked]>
Date: Thu, 11 Apr 2024 12:59:30 -0700

Thalia Archibald <[email-masked]> writes:

> For most of this feature's lifetime, the documentation has not
> prescribed the use of quoted empty strings. In e5959106d6
> (Documentation/fast-import: put explanation of M 040000 <dataref> "" in
> context, 2011-01-15), its documentation was changed from “`<path>` may
> also be an empty string (`""`) to specify the root of the tree” to “The
> root of the tree can be represented by an empty string as `<path>`”.
>
> Thus, we can assume that some front-ends have depended on this behavior.

If I were writing this, I would say "must" instead of "can", as
otherwise it would probably be a good idea if we could tighten it.

Of course no need to reroll just to update this.

> diff --git a/t/t9300-fast-import.sh b/t/t9300-fast-import.sh
> index de2f1304e8..13f98e6688 100755
> --- a/t/t9300-fast-import.sh
> +++ b/t/t9300-fast-import.sh

The changes needed to test both a C_quoted empty string and an
unquoted empty string are so small (when viewed with "show -w")
and pleasant.  Nicely done.