chiark / gitweb /
Commentary: explain why pseudomerges are the way round they are
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Fri, 8 Jun 2018 22:31:02 +0000 (23:31 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 16 Jun 2018 21:40:14 +0000 (22:40 +0100)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
dgit
git-debrebase

diff --git a/dgit b/dgit
index 2a581f389f25cead7ba1b4aa9e8c729b184fc9b4..dc423592e2b7b673c802158522416f8c269fc82b 100755 (executable)
--- a/dgit
+++ b/dgit
@@ -3888,6 +3888,8 @@ sub pseudomerge_make_commit ($$$$ $$) {
        : !length  $overwrite_version ? " --overwrite"
        : " --overwrite=".$overwrite_version;
 
+    # Contributing parent is the first parent - that makes
+    # git rev-list --first-parent DTRT.
     my $pmf = dgit_privdir()."/pseudomerge";
     open MC, ">", $pmf or die "$pmf $!";
     print MC <<END or die $!;
index ad501d8a9f3f2d59678af0cd567b162380ce14a7..f6d379ac81b036e4be6682e1a25b9c24a9b867ef 100755 (executable)
@@ -1086,6 +1086,8 @@ sub stitch ($$$$$) {
        }
     }
     fresh_workarea();
+    # We make pseudomerges with L as the contributing parent.
+    # This makes git rev-list --first-parent work properly.
     my $new_head = make_commit [ $old_head, $ffq_prev ], [
        'Declare fast forward / record previous work',
         "[git-debrebase pseudomerge: $prose]",