diff options
author | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2016-11-07 23:44:52 +0000 |
---|---|---|
committer | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2016-11-07 23:55:40 +0000 |
commit | bc130649687662aa517dbf599b78299937c5efd0 (patch) | |
tree | 1b0e47b0bd07afccc5f4b9fa1f4e8b4b9e1b62bc /dgit | |
parent | 67bd22fce4d2ca34f254a9b502c370304dd626e3 (diff) |
dgit: remove_stray_gits: Print a slightly better message
Change all call sites, and callers of mktree_in_ud_from_only_subdir.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Diffstat (limited to 'dgit')
-rwxr-xr-x | dgit | 19 |
1 files changed, 10 insertions, 9 deletions
@@ -1698,7 +1698,8 @@ sub git_add_write_tree () { return git_write_tree(); } -sub remove_stray_gits () { +sub remove_stray_gits ($) { + my ($what) = @_; my @gitscmd = qw(find -name .git -prune -print0); debugcmd "|",@gitscmd; open GITS, "-|", @gitscmd or die $!; @@ -1706,7 +1707,7 @@ sub remove_stray_gits () { local $/="\0"; while (<GITS>) { chomp or die; - print STDERR "$us: warning: removing from source package: ", + print STDERR "$us: warning: removing from $what: ", (messagequote $_), "\n"; rmtree $_; } @@ -1714,8 +1715,8 @@ sub remove_stray_gits () { $!=0; $?=0; close GITS or failedcmd @gitscmd; } -sub mktree_in_ud_from_only_subdir (;$) { - my ($raw) = @_; +sub mktree_in_ud_from_only_subdir ($;$) { + my ($what,$raw) = @_; # changes into the subdir my (@dirs) = <*/.>; @@ -1724,7 +1725,7 @@ sub mktree_in_ud_from_only_subdir (;$) { my $dir = $1; changedir $dir; - remove_stray_gits(); + remove_stray_gits($what); mktree_in_ud_here(); if (!$raw) { my ($format, $fopts) = get_source_format(); @@ -2150,7 +2151,7 @@ sub generate_commits_from_dsc () { runcmd qw(chmod -R +rwX _unpack-tar); changedir "_unpack-tar"; - remove_stray_gits(); + remove_stray_gits($f); mktree_in_ud_here(); my ($tree) = git_add_write_tree(); @@ -2201,7 +2202,7 @@ sub generate_commits_from_dsc () { push @cmd, qw(-x --), $dscfn; runcmd @cmd; - my ($tree,$dir) = mktree_in_ud_from_only_subdir(); + my ($tree,$dir) = mktree_in_ud_from_only_subdir("source package"); if (madformat $dsc->{format}) { check_for_vendor_patches(); } @@ -3879,7 +3880,7 @@ END progress "checking that $dscfn corresponds to HEAD"; runcmd qw(dpkg-source -x --), $dscpath =~ m#^/# ? $dscpath : "../../../$dscpath"; - my ($tree,$dir) = mktree_in_ud_from_only_subdir(); + my ($tree,$dir) = mktree_in_ud_from_only_subdir("source package"); check_for_vendor_patches() if madformat($dsc->{format}); changedir '../../../..'; my @diffcmd = (@git, qw(diff --quiet), $tree, $dgithead); @@ -5203,7 +5204,7 @@ sub quilt_fixup_multipatch ($$$) { changedir 'fake'; - remove_stray_gits(); + remove_stray_gits("source package"); mktree_in_ud_here(); rmtree '.pc'; |