X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=dgit;h=eb42b00dee0cb75d71e803280ff1c9f3677a2417;hb=10971841444e359f4ca8d490822c390cc7bca890;hp=be11a49802720fe06df4bfd3c7992752aa0c5ec4;hpb=ff7e17f00e19a8940b2a58edc395e24f927a56d2;p=dgit.git diff --git a/dgit b/dgit index be11a498..eb42b00d 100755 --- a/dgit +++ b/dgit @@ -144,6 +144,7 @@ our %opts_cfg_insertpos = map { sub parseopts_late_defaults(); sub setup_gitattrs(;$); +sub check_gitattrs($$); our $keyid; @@ -1698,7 +1699,7 @@ sub mktree_in_ud_here () { runcmd qw(git config gc.auto 0); rmtree('.git/objects'); symlink '../../../../objects','.git/objects' or die $!; - setup_gitattrs(); + setup_gitattrs(1); } sub git_write_tree () { @@ -3256,6 +3257,8 @@ END lrfetchref_used lrfetchref(); + check_gitattrs($hash, "fetched source tree"); + unshift @end, $del_lrfetchrefs; return $hash; } @@ -3350,7 +3353,7 @@ END print GAO <) { + chomp or die; + s/^\d+\s+\w+\s+\w+\s+(\d+)\t// or die; + next if $1 == 0; + next unless m{(?:^|/)\.gitattributes$}; + + # oh dear, found one + print STDERR <(), and returns undef @@ -3569,6 +3601,7 @@ sub clone ($) { mkdir $dstdir or fail "create \`$dstdir': $!"; changedir $dstdir; runcmd @git, qw(init -q); + setup_new_tree(); clone_set_head(); my $giturl = access_giturl(1); if (defined $giturl) { @@ -3587,7 +3620,6 @@ sub clone ($) { $vcsgiturl =~ s/\s+-b\s+\S+//g; runcmd @git, qw(remote add vcs-git), $vcsgiturl; } - setup_new_tree(); clone_finish($dstdir); } @@ -6103,6 +6135,8 @@ sub import_dsc_result { my ($dstref, $newhash, $what_log, $what_msg) = @_; my @cmd = (@git, qw(update-ref -m), $what_log, $dstref, $newhash); runcmd @cmd; + check_gitattrs($newhash, "source tree"); + progress "dgit: import-dsc: $what_msg"; }