From 62cdc56219b149617af4d303c782f3b37e22a529 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sat, 4 Jul 2015 21:49:57 +0100 Subject: [PATCH] dgit: Break out set_local_git_config (nfc) --- dgit | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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 $!; -- 2.30.2