From 6b9192c43040de5e0c18d0cd4057dcfb7457d86a Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sat, 18 Jul 2015 15:08:50 +0100 Subject: [PATCH 1/1] Provide for configurable git url suffix. --- debian/changelog | 1 + dgit | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) 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 ($$;$) { -- 2.30.2