chiark
/
gitweb
/
~ianmdlvl
/
dgit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
clone: Check for git earlier
[dgit.git]
/
dgit
diff --git
a/dgit
b/dgit
index 38b02e4e1b4ca07f8163b9e0ad440a2df0d1b24b..4c8a09dadfa9e43f44c5f8556864874a0e15adc0 100755
(executable)
--- a/
dgit
+++ b/
dgit
@@
-1377,6
+1377,7
@@
sub clone ($) {
my ($dstdir) = @_;
canonicalise_suite();
badusage "dry run makes no sense with clone" unless act_local();
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);
mkdir $dstdir or die "$dstdir $!";
changedir $dstdir;
runcmd @git, qw(init -q);
@@
-1388,7
+1389,7
@@
sub clone ($) {
close H or die $!;
runcmd @git, qw(remote add), 'origin', $giturl;
}
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);
progress "fetching existing git history";
git_fetch_us();
runcmd_ordryrun_local @git, qw(fetch origin);