chiark / gitweb /
git-debrebase: use git_rev_parse 'HEAD' for "internal" head lookups
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Thu, 15 Feb 2018 18:53:52 +0000 (18:53 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 16 Jun 2018 11:25:49 +0000 (12:25 +0100)
We are going to make get_head check the tree is clean

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
git-debrebase

index 47a5712e35125ef3040387236854c1fa6ea9d518..5913aa3307afa57c0490a44e4765509af6a70024 100755 (executable)
@@ -842,7 +842,7 @@ sub cmd_analyse () {
     if (defined $old) {
        $old = git_rev_parse $old;
     } else {
-       $old = get_head();
+       $old = git_rev_parse 'HEAD';
     }
     my ($dummy,$breakwater) = walk $old, 1,*STDOUT;
     STDOUT->error and die $!;
@@ -1180,7 +1180,7 @@ sub cmd_gbp2debrebase () {
        # rebase the patch queue onto the new breakwater
        runcmd @git, qw(reset --quiet --hard patch-queue/gdr-internal);
        runcmd @git, qw(rebase --quiet --onto), $work, qw(gdr-internal);
-       $work = get_head();
+       $work = git_rev_parse 'HEAD';
     };
 
     update_head_checkout $old_head, $work, 'gbp2debrebase';