X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=dgit;h=caa2d75ce85e3ac3592d77a8eae47fa16b8213e7;hb=bada5f43152b731b980626f5f995da1899bc568d;hp=f1f9332a814f0e277fe13391e064044b5b67b270;hpb=e12f9af0e827a5b953f294a4cc0c7fcab7c21603;p=dgit.git diff --git a/dgit b/dgit index f1f9332a..caa2d75c 100755 --- a/dgit +++ b/dgit @@ -1995,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 @@ -3884,6 +3891,7 @@ sub splitbrain_pseudomerge ($$$$) { # return $dgitview unless defined $archive_hash; + return $dgitview if deliberately_not_fast_forward(); printdebug "splitbrain_pseudomerge...\n"; @@ -4435,8 +4443,12 @@ sub cmd_clone { } sub branchsuite () { - my @cmd = (@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 {