From: Ian Jackson Date: Sat, 18 Jul 2015 14:08:50 +0000 (+0100) Subject: Provide for configurable git url suffix. X-Git-Tag: debian/1.0~19 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=dgit.git;a=commitdiff_plain;h=6b9192c43040de5e0c18d0cd4057dcfb7457d86a;hp=4c06b83c1207a4a5d92575ef5117be6f2fab6104 Provide for configurable git url suffix. --- diff --git a/debian/changelog b/debian/changelog index 716b1adc..fd664d3e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -13,6 +13,7 @@ dgit (0.31~~) unstable; urgency=low Access machinery: * Provide for different access mechanisms when pushing. + * Provide for configurable git url suffix. Infrastructure: * Provide for mirroring git updates to a different server. diff --git a/dgit b/dgit index 76a073fc..8f4a71c2 100755 --- a/dgit +++ b/dgit @@ -646,6 +646,7 @@ sub access_gituserhost () { sub access_giturl (;$) { my ($optional) = @_; my $url = access_cfg('git-url','RETURN-UNDEF'); + my $suffix; if (!defined $url) { my $proto = access_cfg('git-proto', 'RETURN-UNDEF'); return undef unless defined $proto; @@ -653,8 +654,11 @@ sub access_giturl (;$) { $proto. access_gituserhost(). access_cfg('git-path'); + } else { + $suffix = access_cfg('git-url-suffix','RETURN-UNDEF'); } - return "$url/$package.git"; + $suffix //= '.git'; + return "$url/$package$suffix"; } sub parsecontrolfh ($$;$) {