X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=dgit;h=802d791fb7504af58a152b3c73d1787df37aa2ba;hb=62cdc56219b149617af4d303c782f3b37e22a529;hp=ea9652438ff5b4935609d29d21824845519e8c75;hpb=c963c8da4cb34cc4ddddaf2b936dbfef10f74e58;p=dgit.git 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 $!;