chiark / gitweb /
Dgit.pm: Move hash_commit from dgit
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Fri, 28 Jun 2019 23:25:14 +0000 (00:25 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Fri, 28 Jun 2019 23:52:53 +0000 (00:52 +0100)
No functional change other than to no longer honour @git.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Debian/Dgit.pm
dgit

index e9a85f76b7e4145263d478e0b11f217f145d5992..22cef219cde4abe9c6966ba16231b424cc388caa 100644 (file)
@@ -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
                      git_reflog_action_msg  git_update_ref_cmd
                      rm_subdir_cached read_tree_subdir
                      read_tree_debian read_tree_upstream
-                     make_commit hash_commit_text
+                     make_commit hash_commit hash_commit_text
                      reflog_cache_insert reflog_cache_lookup
                       $package_re $component_re $deliberately_re
                      $distro_re $versiontag_re $series_filename_re
                      reflog_cache_insert reflog_cache_lookup
                       $package_re $component_re $deliberately_re
                      $distro_re $versiontag_re $series_filename_re
@@ -840,6 +840,11 @@ sub make_commit ($$) {
     return cmdoutput @cmd;
 }
 
     return cmdoutput @cmd;
 }
 
+sub hash_commit ($) {
+    my ($file) = @_;
+    return cmdoutput qw(git hash-object -w -t commit), $file;
+}
+
 sub hash_commit_text ($) {
     my ($text) = @_;
     my ($out, $in);
 sub hash_commit_text ($) {
     my ($text) = @_;
     my ($out, $in);
diff --git a/dgit b/dgit
index 63acf0abb0dd9f2d8b89024e33d869f2502f19b6..adf22f662287efb9205a4045a20451546829acb4 100755 (executable)
--- a/dgit
+++ b/dgit
@@ -2112,11 +2112,6 @@ END
     }
 }
 
     }
 }
 
-sub hash_commit ($) {
-    my ($file) = @_;
-    return cmdoutput @git, qw(hash-object -w -t commit), $file;
-}
-
 sub clogp_authline ($) {
     my ($clogp) = @_;
     my $author = getfield $clogp, 'Maintainer';
 sub clogp_authline ($) {
     my ($clogp) = @_;
     my $author = getfield $clogp, 'Maintainer';