From: Ian Jackson Date: Mon, 7 Nov 2016 02:49:22 +0000 (+0000) Subject: dgit: Make clone_set_head not depend on $giturl X-Git-Tag: archive/debian/2.10~29 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;ds=sidebyside;h=d422e614352724c8cd511c8d1ae8a6d9a1ba5265;p=dgit.git dgit: Make clone_set_head not depend on $giturl When cloning a distro which has no git server, correctly leave the user on the local dgit branch, not on `master'. Signed-off-by: Ian Jackson --- diff --git a/debian/changelog b/debian/changelog index 7daf4f38..c8f81558 100644 --- a/debian/changelog +++ b/debian/changelog @@ -4,6 +4,8 @@ dgit (2.10~) unstable; urgency=medium * Test suite: Add fakeroot and make to Test-Depends. These aren't necessarily pulled in by anything else. (dpkg-dev Recommends build-essential. But we don't actually need build-essential.) + * When cloning a distro which has no git server, correctly leave + the user on the local dgit branch, not on `master'. -- diff --git a/dgit b/dgit index 0f9236ce..f1a30c3a 100755 --- a/dgit +++ b/dgit @@ -3096,9 +3096,9 @@ sub clone ($) { mkdir $dstdir or fail "create \`$dstdir': $!"; changedir $dstdir; runcmd @git, qw(init -q); + clone_set_head(); my $giturl = access_giturl(1); if (defined $giturl) { - clone_set_head(); runcmd @git, qw(remote add), 'origin', $giturl; } if ($hasgit) {