Fix for #8271: Correctly restore empty repositories.
Created by: ghost
If a project is being restored, but there is no bundle file, the project was empty when it was backed up. In this case, just use git init --base to create a new bare repository.
Merge request reports
Activity
Created by: TeatroIO
I've prepared a stage. Click to open.
By Administrator on 2014-11-13T12:19:19 (imported from GitLab project)
By Administrator on 2014-11-13T12:19:19 (imported from GitLab)
59 59 60 60 project.namespace.ensure_dir_exist if project.namespace 61 61 62 if system(*%W(git clone --bare #{path_to_bundle(project)} #{path_to_repo(project)}), silent) 62 if File.exists?(path_to_bundle(project)) 63 cmd = %W(git clone --bare #{path_to_bundle(project)} #{path_to_repo(project)}) Created by: axilleas
\cc @jacobvosmaer
By Administrator on 2014-11-13T12:59:53 (imported from GitLab project)
By Administrator on 2014-11-13T12:59:53 (imported from GitLab)
Created by: jacobvosmaer
Thanks @dandric-activevideo
By Administrator on 2014-11-13T14:35:01 (imported from GitLab project)
By Administrator on 2014-11-13T14:35:01 (imported from GitLab)
Created by: bbodenmiller
@dandric-activevideo before this was implemented what happened when you restored empty repos? I need to do a restore before the 7.5 release and am wondering if I will have issues.
By Administrator on 2014-11-14T08:15:46 (imported from GitLab project)
By Administrator on 2014-11-14T08:15:46 (imported from GitLab)
Created by: ghost
@bbodenmiller, as you can see in #8271 (closed) and #8293 (closed), the restore operation errored out, e.g.:
Restoring repositories ... [... lots of repos restore fine ...] sveer/sander ... [FAILED] Restore failed
In the above example the 'sveer/sander' project was just created, but did not have any commits pushed to it yet.
As a workaround, you can either delete all empty projects before creating a backup, or you can just locally apply 4e65d085 before attempting the restore.
By Administrator on 2014-11-14T08:43:57 (imported from GitLab project)
By Administrator on 2014-11-14T08:43:57 (imported from GitLab)