chiark / gitweb /
dgit: Break out set_local_git_config (nfc)
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 4 Jul 2015 20:49:57 +0000 (21:49 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 4 Jul 2015 21:00:19 +0000 (22:00 +0100)
dgit

diff --git a/dgit b/dgit
index ea9652438ff5b4935609d29d21824845519e8c75..802d791fb7504af58a152b3c73d1787df37aa2ba 100755 (executable)
--- 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 $!;