chiark / gitweb /
Break out $branchprefix, server_branch, server_ref into Dgit.pm
[dgit.git] / dgit
diff --git a/dgit b/dgit
index 0b5bf05c1de0f81c07a87af0c5cda369e58ec331..a0144bcde7901c8c702d5a77878f8f841aa29391 100755 (executable)
--- a/dgit
+++ b/dgit
@@ -104,15 +104,14 @@ autoflush STDOUT 1;
 
 our $remotename = 'dgit';
 our @ourdscfield = qw(Dgit Vcs-Dgit-Master);
-our $branchprefix = 'dgit';
 our $csuite;
 our $instead_distro;
 
 sub lbranch () { return "$branchprefix/$csuite"; }
 my $lbranch_re = '^refs/heads/'.$branchprefix.'/([^/.]+)$';
 sub lref () { return "refs/heads/".lbranch(); }
-sub lrref () { return "refs/remotes/$remotename/$branchprefix/$csuite"; }
-sub rrref () { return "refs/$branchprefix/$csuite"; }
+sub lrref () { return "refs/remotes/$remotename/".server_branch($csuite); }
+sub rrref () { return server_ref($csuite); }
 
 sub stripepoch ($) {
     my ($vsn) = @_;