fast-import should fail on invalid unsupported paths

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

with this simple recipe, you get a non-usable repository:

mkdir foo
cd foo
git init --bare repo
cd repo
git fast-import <<"EOM"
commit refs/heads/master
committer <foo@xxxxxxx> 0 +0000
data 3
foo
M 644 inline foo/.git/bar
data 3
baz
EOM
cd ..
git clone repo worktree

This actually happened when a user tried to port an SVN repository to
a Git repository and had ".git" paths in the SVN repository.
Using KDEs svn2git utility fast-import accepted the invalid path, but
then when trying to checkout during the clone operation, you get the
error message

Cloning into 'worktree'...
done.
error: Invalid path 'foo/.git/bar'

and the worktree stays empty.

I think fast-import should refuse to import paths Git cannot handle
properly later on, so that the migration fails early and the frontend
that generates the fast-import stream can be fixed / configured to not
include such invalid paths.

Regards
Björn



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux