chiark / gitweb /
Rename various *make_commit* to *hash_commit*
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Fri, 28 Jun 2019 23:22:01 +0000 (00:22 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Fri, 28 Jun 2019 23:52:46 +0000 (00:52 +0100)
This avoids a subroutine name clash with make_commit in gdr.

No functional change.

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

index f1ea1e855737c9bbe8cdd4f60c92eab7aae9f9f4..23db6378fe1a06bfb388c25293b4e9e3822d51f9 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
-                     make_commit_text
+                     hash_commit_text
                      reflog_cache_insert reflog_cache_lookup
                       $package_re $component_re $deliberately_re
                      $distro_re $versiontag_re $series_filename_re
@@ -831,7 +831,7 @@ sub parsechangelog_loop ($$$) {
     close CLOGS or $?==SIGPIPE or failedcmd @$clogcmd;
 }      
 
-sub make_commit_text ($) {
+sub hash_commit_text ($) {
     my ($text) = @_;
     my ($out, $in);
     my @cmd = (qw(git hash-object -w -t commit --stdin));
@@ -872,7 +872,7 @@ sub reflog_cache_insert ($$$) {
        # git update-ref doesn't always update, in this case.  *sigh*
        my $authline = (ucfirst _us()).
            ' <'._us().'@example.com> 1000000000 +0000';
-       my $dummy = make_commit_text <<ENDU.(__ <<END);
+       my $dummy = hash_commit_text <<ENDU.(__ <<END);
 tree $tree
 parent $value
 author $authline
diff --git a/dgit b/dgit
index 26a8bf0cc9d835c80d221e57d4a538056dc81ef5..63acf0abb0dd9f2d8b89024e33d869f2502f19b6 100755 (executable)
--- a/dgit
+++ b/dgit
@@ -2112,7 +2112,7 @@ END
     }
 }
 
-sub make_commit ($) {
+sub hash_commit ($) {
     my ($file) = @_;
     return cmdoutput @git, qw(hash-object -w -t commit), $file;
 }
@@ -2528,7 +2528,7 @@ sub generate_commits_from_dsc () {
            printdebug "import tartree $tt->{F} $tt->{Tree}\n";
 
            my $mbody = f_ "Import %s", $tt->{F};
-           $tt->{Commit} = make_commit_text($tt->{Orig} ? <<END_O : <<END_T);
+           $tt->{Commit} = hash_commit_text($tt->{Orig} ? <<END_O : <<END_T);
 tree $tt->{Tree}
 author $r1authline
 committer $r1authline
@@ -2567,14 +2567,14 @@ $changes
 END
 
     close C or confess "$!";
-    my $rawimport_hash = make_commit qw(../commit.tmp);
+    my $rawimport_hash = hash_commit qw(../commit.tmp);
 
     if (madformat $dsc->{format}) {
        printdebug "import apply patches...\n";
 
        # regularise the state of the working tree so that
        # the checkout of $rawimport_hash works nicely.
-       my $dappliedcommit = make_commit_text(<<END);
+       my $dappliedcommit = hash_commit_text(<<END);
 tree $dappliedtree
 author $authline
 committer $authline
@@ -3424,7 +3424,7 @@ END
        }
 
        close MC or confess "$!";
-       $hash = make_commit $mcf;
+       $hash = hash_commit $mcf;
     } else {
        $hash = $mergeinputs[0]{Commit};
     }
@@ -3785,7 +3785,7 @@ sub fork_for_multisuite ($) {
        $commit .=
            "author $authline\n".
            "committer $authline\n\n";
-       $output = make_commit_text $commit.$msg;
+       $output = hash_commit_text $commit.$msg;
        printdebug "multisuite merge generated $output\n";
     }
 
@@ -4112,7 +4112,7 @@ END
     return $i_arch_v;
 }
 
-sub pseudomerge_make_commit ($$$$ $$) {
+sub pseudomerge_hash_commit ($$$$ $$) {
     my ($clogp, $dgitview, $archive_hash, $i_arch_v,
        $msg_cmd, $msg_msg) = @_;
     progress f_ "Declaring that HEAD includes all changes in %s...",
@@ -4144,7 +4144,7 @@ $msg_msg
 END
     close MC or confess "$!";
 
-    return make_commit($pmf);
+    return hash_commit($pmf);
 }
 
 sub splitbrain_pseudomerge ($$$$) {
@@ -4202,7 +4202,7 @@ ENDT
     }
 
     my $arch_v = $i_arch_v->[0];
-    my $r = pseudomerge_make_commit
+    my $r = pseudomerge_hash_commit
        $clogp, $dgitview, $archive_hash, $i_arch_v,
        "dgit --quilt=$quilt_mode",
        (defined $overwrite_version
@@ -4226,7 +4226,7 @@ sub plain_overwrite_pseudomerge ($$$) {
 
     my $m = f_ "Declare fast forward from %s", $i_arch_v->[0];
 
-    my $r = pseudomerge_make_commit
+    my $r = pseudomerge_hash_commit
        $clogp, $head, $archive_hash, $i_arch_v,
        "dgit", $m;
 
@@ -7090,7 +7090,7 @@ END
            my $version = getfield $dsc, 'Version';
            my $clogp = commit_getclogp $newhash;
            my $authline = clogp_authline $clogp;
-           $newhash = make_commit_text <<ENDU
+           $newhash = hash_commit_text <<ENDU
 tree $tree
 parent $newhash
 parent $oldhash