chiark / gitweb /
git-debrebase: record_gdrlast: Honour $oldvalue
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 19 Aug 2018 22:12:34 +0000 (23:12 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 19 Aug 2018 22:43:02 +0000 (23:43 +0100)
NFC for existing callers.

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

index f09508e..630b8c2 100755 (executable)
@@ -433,9 +433,10 @@ sub ffq_prev_branchinfo () {
     return gdr_ffq_prev_branchinfo($current);
 }
 
-sub record_gdrlast ($$) {
-    my ($gdrlast, $newvalue) = @_;
-    push @deferred_updates, "update $gdrlast $newvalue $git_null_obj";
+sub record_gdrlast ($$;$) {
+    my ($gdrlast, $newvalue, $oldvalue) = @_;
+    $oldvalue ||= $git_null_obj;
+    push @deferred_updates, "update $gdrlast $newvalue $oldvalue";
 }
 
 sub gbp_pq_export ($$$) {