diff options
author | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2018-08-11 21:08:00 +0100 |
---|---|---|
committer | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2018-08-12 01:40:29 +0100 |
commit | 027613e7a281123f4512ca4c1b99552cc78ca72b (patch) | |
tree | 72ad3dfa4a5d4ba2925359d54cd75afac51ae668 /dgit | |
parent | 5ad9edffc1e0658f287b45feccbd7c97e0bfd412 (diff) |
Dgit.pm: Move make_commit_text from dgit
NFC other than the usual change to literal `git'.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Diffstat (limited to 'dgit')
-rwxr-xr-x | dgit | 22 |
1 files changed, 0 insertions, 22 deletions
@@ -1991,28 +1991,6 @@ sub make_commit ($) { return cmdoutput @git, qw(hash-object -w -t commit), $file; } -sub make_commit_text ($) { - my ($text) = @_; - my ($out, $in); - my @cmd = (@git, qw(hash-object -w -t commit --stdin)); - debugcmd "|",@cmd; - print Dumper($text) if $debuglevel > 1; - my $child = open2($out, $in, @cmd) or die $!; - my $h; - eval { - print $in $text or die $!; - close $in or die $!; - $h = <$out>; - $h =~ m/^\w+$/ or die; - $h = $&; - printdebug "=> $h\n"; - }; - close $out; - waitpid $child, 0 == $child or die "$child $!"; - $? and failedcmd @cmd; - return $h; -} - sub clogp_authline ($) { my ($clogp) = @_; my $author = getfield $clogp, 'Maintainer'; |