fast-import: don't allow 'ls' of path with empty components
As the fast-import manual explains:
The value of <path> must be in canonical form. That is it must
. contain an empty directory component (e.g. foo//bar is invalid),
. end with a directory separator (e.g. foo/ is invalid),
. start with a directory separator (e.g. /foo is invalid),
Unfortunately the "ls" command accepts these invalid syntaxes and
responds by declaring that the indicated path is missing. This is too
subtle and causes importers to silently misbehave; better to error out
so the operator knows what's happening.
The C, R, and M commands already error out for such paths.
Reported-by: Andrew Sayers <firstname.lastname@example.org>
Analysis-by: David Barr <email@example.com>
Signed-off-by: Jonathan Nieder <firstname.lastname@example.org>
2 files changed