summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--debian/changelog2
-rwxr-xr-xdgit9
2 files changed, 10 insertions, 1 deletions
diff --git a/debian/changelog b/debian/changelog
index 4e3ecdc..2269201 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -6,6 +6,8 @@ dgit (3.10~) unstable; urgency=medium
* dgit: Strip initial newline from Changes line from dpkg-parsechangelog
so as to avoid blank line in commit messages. Closes:#853093.
* dgit: Do not fail when run with detached HEAD. Closes:#853022.
+ * dgit: Be much better about commas in maintainer changelog names.
+ Closes:#852661.
Test suite:
* quilt-useremail: New test for user config copying (#853085).
diff --git a/dgit b/dgit
index 724dba1..6b1201e 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