• Kirill Smelkov's avatar
    Make sure git will recognize *.git as repositories, even empty ones, after restore · b770b689
    Kirill Smelkov authored
    On restore we were initializing refs/ and objects/ for repositories
    obtained from backuped refs set, but this approach does not cover empty
    repositories - e.g. repositories without any ref at all.
    
    A frequent case for this is *.wiki.git in gitlab, and if we restore only
    files for such repo, without empty refs/ and objects/ it would look like
    restored ok, but any git-related operation on such repo will fail.
    
    Fix it via making sure to create refs/ and objects/ the first time we
    see a *.git while restoring files.
    
    /cc @kazuhiko
    b770b689
git-backup 29.4 KB