Re: [PATCH v3 3/8] fast-import: allow unquoted empty path for root
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Apr 11, 2024, 19:59 UTC
- Message-ID
- <xmqqwmp3smal.fsf@gitster.g>
- In-Reply-To
- <39879d0a6627b62f685b38b9afcfe19e4c14c38e.1712741871.git.thalia@archibald.dev>
Thalia Archibald <thalia@archibald.dev> writes:
Show 8 quoted lines
> 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.