diff options
author | Guillem Jover <guillem@debian.org> | 2013-04-21 07:04:35 +0200 |
---|---|---|
committer | Guillem Jover <guillem@debian.org> | 2013-04-29 18:46:50 +0200 |
commit | 8db43e1c6cf8c77d1f49f42f0ec4bb67cbf0e86c (patch) | |
tree | 26808b87e4c97b44c96a936cdaefb67ddeb2a5b9 /scripts/Dpkg/Source/Package/V3/git.pm | |
parent | 6024a66abdf9e49f29099a49c0f057459d77df80 (diff) | |
download | dpkg-8db43e1c6cf8c77d1f49f42f0ec4bb67cbf0e86c.tar.gz |
Dpkg: Use identifiers as key names whenever possible
The fixed key names are either inside unstable modules, internal to
them or for keys in code never released, so should not cause much of
an issue.
Diffstat (limited to 'scripts/Dpkg/Source/Package/V3/git.pm')
-rw-r--r-- | scripts/Dpkg/Source/Package/V3/git.pm | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/scripts/Dpkg/Source/Package/V3/git.pm b/scripts/Dpkg/Source/Package/V3/git.pm index 998fdb826..b1e4a0dbc 100644 --- a/scripts/Dpkg/Source/Package/V3/git.pm +++ b/scripts/Dpkg/Source/Package/V3/git.pm @@ -76,10 +76,10 @@ sub parse_cmdline_option { my ($self, $opt) = @_; return 1 if $self->SUPER::parse_cmdline_option($opt); if ($opt =~ /^--git-ref=(.*)$/) { - push @{$self->{'options'}{'git-ref'}}, $1; + push @{$self->{'options'}{'git_ref'}}, $1; return 1; } elsif ($opt =~ /^--git-depth=(\d+)$/) { - $self->{'options'}{'git-depth'} = $1; + $self->{'options'}{'git_depth'} = $1; return 1; } return 0; @@ -138,7 +138,7 @@ sub do_build { # bundle that. my $tmp; my $shallowfile; - if ($self->{'options'}{'git-depth'}) { + if ($self->{'options'}{'git_depth'}) { chdir($old_cwd) || syserr(_g("unable to chdir to `%s'"), $old_cwd); $tmp = tempdir("$dirname.git.XXXXXX", DIR => $updir); @@ -147,8 +147,8 @@ sub do_build { # file:// is needed to avoid local cloning, which does not # create a shallow clone. info(_g("creating shallow clone with depth %s"), - $self->{'options'}{'git-depth'}); - system("git", "clone", "--depth=".$self->{'options'}{'git-depth'}, + $self->{'options'}{'git_depth'}); + system("git", "clone", "--depth=" . $self->{'options'}{'git_depth'}, "--quiet", "--bare", "file://" . abs_path($dir), $clone_dir); $? && subprocerr("git clone"); chdir($clone_dir) || @@ -160,8 +160,8 @@ sub do_build { # Create the git bundle. my $bundlefile = "$basenamerev.git"; - my @bundle_arg=$self->{'options'}{'git-ref'} ? - (@{$self->{'options'}{'git-ref'}}) : "--all"; + my @bundle_arg = $self->{'options'}{'git_ref'} ? + (@{$self->{'options'}{'git_ref'}}) : "--all"; info(_g("bundling: %s"), join(" ", @bundle_arg)); system("git", "bundle", "create", "$old_cwd/$bundlefile", @bundle_arg, |