ref: 662eb3f8a4e240bbc2aa17ec0274a419316c5e25
parent: 5f20f26e577847ba986edb7c0c2549976640c95c
author: Michael Forney <[email protected]>
date: Tue Mar 8 11:54:21 EST 2022
git: add new lca test lca(a, b) is currently failing, so it is commented out until fixed.
--- a/cmd/git/lca.rc
+++ b/cmd/git/lca.rc
@@ -39,3 +39,31 @@
~ `{git/query $a $b @} $r || die lca a-b
~ `{git/query $a $r @} $r || die lca a-r
}
+
+# a
+# ↓
+# b→c→d→e→f
+#
+# date order (oldest to newest): f d c b e a
+echo @@ test lca rebase @@
+@{
+ q git/init b
+ cd b
+
+ touch f
+
+ fn commit {
+ git/save -n regress -e regress $* f
+ }
+
+ f=`{commit -m f -d 1}
+ e=`{commit -m e -d 5 -p $f}
+ d=`{commit -m d -d 2 -p $e}
+ c=`{commit -m c -d 3 -p $d}
+ b=`{commit -m b -d 4 -p $c}
+ a=`{commit -m a -d 6 -p $e}
+
+# FIXME: currently failing
+#~ `{git/query $a $b @} $e || die lca a-b
+~ `{git/query $b $a @} $e || die lca b-a
+}