From: Ian Jackson Date: Sat, 4 Jul 2015 20:49:57 +0000 (+0100) Subject: dgit: Break out set_local_git_config (nfc) X-Git-Tag: debian/0.30~14 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=dgit.git;a=commitdiff_plain;h=62cdc56219b149617af4d303c782f3b37e22a529 dgit: Break out set_local_git_config (nfc) --- diff --git a/dgit b/dgit index ea965243..802d791f 100755 --- a/dgit +++ b/dgit @@ -1476,6 +1476,11 @@ END return 1; } +sub set_local_git_config ($$) { + my ($k, $v) = @_; + runcmd @git, qw(config), $k, $v; +} + sub clone ($) { my ($dstdir) = @_; canonicalise_suite(); @@ -1486,7 +1491,7 @@ sub clone ($) { runcmd @git, qw(init -q); my $giturl = access_giturl(1); if (defined $giturl) { - runcmd @git, qw(config), "remote.$remotename.fetch", fetchspec(); + set_local_git_config "remote.$remotename.fetch", fetchspec(); open H, "> .git/HEAD" or die $!; print H "ref: ".lref()."\n" or die $!; close H or die $!;