X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=dgit;h=4c8a09dadfa9e43f44c5f8556864874a0e15adc0;hb=a6c314119abf6563de1651764756a46e169e6716;hp=af710657502fc822ac6a04e64e68329941890840;hpb=2479a589cce5c9c12044c89b3d530912efedb78e;p=dgit.git diff --git a/dgit b/dgit index af710657..4c8a09da 100755 --- a/dgit +++ b/dgit @@ -664,7 +664,9 @@ sub access_runeinfo ($) { sub access_someuserhost ($) { my ($some) = @_; - my $user = access_cfg("$some-user",'username'); + my $user = access_cfg("$some-user-force", 'RETURN-UNDEF'); + defined($user) && length($user) or + $user = access_cfg("$some-user",'username'); my $host = access_cfg("$some-host"); return length($user) ? "$user\@$host" : $host; } @@ -1375,6 +1377,7 @@ sub clone ($) { my ($dstdir) = @_; canonicalise_suite(); badusage "dry run makes no sense with clone" unless act_local(); + my $hasgit = check_for_git(); mkdir $dstdir or die "$dstdir $!"; changedir $dstdir; runcmd @git, qw(init -q); @@ -1386,7 +1389,7 @@ sub clone ($) { close H or die $!; runcmd @git, qw(remote add), 'origin', $giturl; } - if (check_for_git()) { + if ($hasgit) { progress "fetching existing git history"; git_fetch_us(); runcmd_ordryrun_local @git, qw(fetch origin);