Bug#852332: dh-make-perl: DEBFULLNAME and DEBEMAIL should be used with git

Dominic Hargreaves dom at earth.li
Tue Jan 24 12:55:10 UTC 2017


On Tue, Jan 24, 2017 at 12:32:58PM +0000, Carnë Draug wrote:

> diff --git a/lib/DhMakePerl/Command/make.pm b/lib/DhMakePerl/Command/make.pm
> index 31db889..4cde1da 100644
> --- a/lib/DhMakePerl/Command/make.pm
> +++ b/lib/DhMakePerl/Command/make.pm
> @@ -748,7 +748,7 @@ sub git_import_upstream__init_debian {
>      my $git = Git->repository( $self->main_dir );
>      $git->command( qw(symbolic-ref HEAD refs/heads/upstream) );
>      $git->command( 'add', '.' );
> -    $git->command( 'commit', '-m',
> +    $git->command( 'commit', '--author', $self->get_developer, '-m',
>                "Import original source of "
>              . $self->perlname . ' '
>              . $self->version );
> @@ -762,7 +762,7 @@ sub git_import_upstream__init_debian {
>        # debian/ directory from the working tree; git has the history, so I don't
>        # need the debian.bak
>        $git->command( 'rm', '-r', $self->debian_dir );
> -      $git->command( 'commit', '-m',
> +      $git->command( 'commit', '--author', $self->get_developer, '-m',
>                       'Removed debian directory embedded in upstream source' );
>      }
>  }
> @@ -777,7 +777,7 @@ sub git_add_debian {
>  
>      my $git = Git->repository( $self->main_dir );
>      $git->command( 'add', 'debian' );
> -    $git->command( 'commit', '-m',
> +    $git->command( 'commit', '--author', $self->get_developer, '-m',
>          "Initial packaging by dh-make-perl $VERSION" );
>      $git->command(
>          qw( remote add origin ),

This will indeed create commits with the email and name specified, but
the committer address will not be overridden which is probably confusing.
Also, any future commits to the repo it created will use the global default,
which may be confusing. (There's no option to override the committer
in the git commit command)

Setting the per-repo config would fix both these issues at the expense
of sprinkling potentially unwanted hard-coded data in the repos. Changing
the git global default would obviously be unwanted and rude.

I think I'm leaning towards adding the repo config being the least
worst option, but I'm not completely sure.

Dominic.



More information about the pkg-perl-maintainers mailing list