diff options
author | Sean Whitton <spwhitton@spwhitton.name> | 2017-02-17 10:05:35 -0700 |
---|---|---|
committer | Sean Whitton <spwhitton@spwhitton.name> | 2017-02-17 10:05:35 -0700 |
commit | 5ca29dfbaba58a6ed167a038b2bcefb07083b04c (patch) | |
tree | f1202a0e444c6524e3fc7479d628a19fb62c41b3 /dgit | |
parent | e163c8511130654982c5bd79c145e903e8fca1ca (diff) | |
parent | c487f49f00c2a7ab106ef4e5f6cb043e72028986 (diff) |
Merge remote-tracking branch 'dgit/dgit/stretch' into jessie-bpo
Diffstat (limited to 'dgit')
-rwxr-xr-x | dgit | 22 |
1 files changed, 20 insertions, 2 deletions
@@ -1699,6 +1699,11 @@ sub prep_ud (;$) { sub mktree_in_ud_here () { runcmd qw(git init -q); runcmd qw(git config gc.auto 0); + foreach my $copy (qw(user.email user.name user.useConfigOnly)) { + my $v = $gitcfgs{local}{$copy}; + next unless $v; + runcmd qw(git config), $copy, $_ foreach @$v; + } rmtree('.git/objects'); symlink '../../../../objects','.git/objects' or die $!; setup_gitattrs(1); @@ -1990,7 +1995,14 @@ sub make_commit_text ($) { sub clogp_authline ($) { my ($clogp) = @_; my $author = getfield $clogp, 'Maintainer'; - $author =~ s#,.*##ms; + if ($author =~ m/^[^"\@]+\,/) { + # single entry Maintainer field with unquoted comma + $author = ($& =~ y/,//rd).$'; # strip the comma + } + # git wants a single author; any remaining commas in $author + # are by now preceded by @ (or "). It seems safer to punt on + # "..." for now rather than attempting to dequote or something. + $author =~ s#,.*##ms unless $author =~ m/"/; my $date = cmdoutput qw(date), '+%s %z', qw(-d), getfield($clogp,'Date'); my $authline = "$author $date"; $authline =~ m/$git_authline_re/o or @@ -2312,6 +2324,7 @@ sub generate_commits_from_dsc () { my $authline = clogp_authline $clogp; my $changes = getfield $clogp, 'Changes'; + $changes =~ s/^\n//; # Changes: \n my $cversion = getfield $clogp, 'Version'; if (@tartrees) { @@ -4429,7 +4442,12 @@ sub cmd_clone { } sub branchsuite () { - my $branch = cmdoutput_errok @git, qw(symbolic-ref HEAD); + my @cmd = (@git, qw(symbolic-ref -q HEAD)); + my $branch = cmdoutput_errok @cmd; + if (!defined $branch) { + $?==256 or failedcmd @cmd; + return undef; + } if ($branch =~ m#$lbranch_re#o) { return $1; } else { |