• E
    git svn: fix shallow clone when upstream revision is too new · 4aacaeb3
    Eric Wong 提交于
    Thanks to Ka-Hing Cheung for the initial bug report and patch:
    > git-svn uses $ra->get_latest_revnum to find out the latest
    > revision, but that can be problematic, because get_latest_revnum
    > returns the latest revnum in the entire repository, not
    > restricted by whatever URL you used to construct $ra. So if you
    > do git svn clone -r HEAD svn://blah/blah/trunk, it won't work if
    > the latest checkin is in one of the branches (it will try to
    > fetch a rev that doesn't exist in trunk, making the clone
    > useless).
    
    Relying on SVN::Core::INVALID_REVNUM (-1) as the "start"
    argument to SVN::Ra::get_log() proved unreliable with http(s)
    URLs so the result of SVN::Ra::get_latest_revnum() is used as
    the "start" argument instead.
    Signed-off-by: NEric Wong <normalperson@yhbt.net>
    4aacaeb3
git-svn.perl 156.8 KB