ADD: check if repository already has an issue manager
This commit is contained in:
parent
b61b7dedf9
commit
b6e4b2d6ba
@ -225,6 +225,11 @@ sub init
|
|||||||
my $ref = $self->repository->getReference('refs/heads/issues');
|
my $ref = $self->repository->getReference('refs/heads/issues');
|
||||||
my $root = $ref->getTree();
|
my $root = $ref->getTree();
|
||||||
|
|
||||||
|
#check if version and tag file already exist
|
||||||
|
my $checkVersion=$root->find(".version");
|
||||||
|
my $checkTag=$root->find(".tag");
|
||||||
|
die("repository already has an initialized issue manager") unless !(defined($checkVersion) && defined($checkTag));
|
||||||
|
|
||||||
my $version = $root->newBlob();
|
my $version = $root->newBlob();
|
||||||
$version->path(".version");
|
$version->path(".version");
|
||||||
$version->_content("0.1");
|
$version->_content("0.1");
|
||||||
|
Loading…
Reference in New Issue
Block a user