diff options
author | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2019-06-29 00:23:39 +0100 |
---|---|---|
committer | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2019-06-29 00:52:47 +0100 |
commit | 5bed21be705bbfc578b623b9543344e4d8efb4a9 (patch) | |
tree | ee349e061268b2b390ada28d23eb23eb865682a7 | |
parent | f612635f94e6c25585ee0064fda468099f22b88f (diff) |
Dgit.pm: Move make_commit (git-commit-tree wrapper) from gdr
No functional change other than to no longer honour @git.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
-rw-r--r-- | Debian/Dgit.pm | 11 | ||||
-rwxr-xr-x | git-debrebase | 9 |
2 files changed, 10 insertions, 10 deletions
diff --git a/Debian/Dgit.pm b/Debian/Dgit.pm index 23db637..e9a85f7 100644 --- a/Debian/Dgit.pm +++ b/Debian/Dgit.pm @@ -62,7 +62,7 @@ BEGIN { git_reflog_action_msg git_update_ref_cmd rm_subdir_cached read_tree_subdir read_tree_debian read_tree_upstream - hash_commit_text + make_commit hash_commit_text reflog_cache_insert reflog_cache_lookup $package_re $component_re $deliberately_re $distro_re $versiontag_re $series_filename_re @@ -831,6 +831,15 @@ sub parsechangelog_loop ($$$) { close CLOGS or $?==SIGPIPE or failedcmd @$clogcmd; } +sub make_commit ($$) { + my ($parents, $message_paras) = @_; + my $tree = cmdoutput qw(git write-tree); + my @cmd = (qw(git commit-tree), $tree); + push @cmd, qw(-p), $_ foreach @$parents; + push @cmd, qw(-m), $_ foreach @$message_paras; + return cmdoutput @cmd; +} + sub hash_commit_text ($) { my ($text) = @_; my ($out, $in); diff --git a/git-debrebase b/git-debrebase index 0be1af7..7dde1e7 100755 --- a/git-debrebase +++ b/git-debrebase @@ -355,15 +355,6 @@ sub calculate_committer_authline () { return $&; } -sub make_commit ($$) { - my ($parents, $message_paras) = @_; - my $tree = cmdoutput @git, qw(write-tree); - my @cmd = (@git, qw(commit-tree), $tree); - push @cmd, qw(-p), $_ foreach @$parents; - push @cmd, qw(-m), $_ foreach @$message_paras; - return cmdoutput @cmd; -} - our @snag_force_opts; sub snag ($$;@) { my ($tag,$msg) = @_; # ignores extra args, for benefit of keycommits |