Something went wrong while setting issue due date.
Empty dirs are not tracked (Restoring repo require their name to ends with ".git")
Open
Empty dirs are not tracked (Restoring repo require their name to ends with ".git")
To reproduce the bug:
get some bare repo:
$ git clone --bare slapos slapos.git
backup-pull it:
$ mkdir backup && cd backup && git init
$ git-backup pull ../slapos.git/:slapos
when restoring:
$ git-backup restore HEAD slapos:../slapos.restored
$ cd .. && git clone slapos.restored slapos_bis
fatal: repository 'slapos.restored' does not exist
As @kirr explained me, it is due to git not tracking trees of empty directories:
$ls slapos.git/refs/ -Ra
slapos.git/refs/:
. .. heads tags
slapos.git/refs/heads:
. ..
slapos.git/refs/tags:
. ..
So some directory that are used by the restored repo are missing. This is currently fixed by detecting if it is a git repo or not (it is also possible to backup usual folder/files) by verifying its extension. So it works fine when restoring this way:
$ git-backup restore HEAD slapos:../slapos.restored.git
gives:
$ cd ../slapos.restored.git && git log
commit 5f5d5102cf2dd2b4a8d092e32dfc6b87fa3bbc12
Author: [...]
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Please register or sign in to reply