shithub: git9

Download patch

ref: f12b5c3161f316418737a7bd7231ffe386478ded
parent: b18bdb3ef382966221a4ea5be3c2443a6cf57b9e
author: Michael Forney <mforney@mforney.org>
date: Sun Jan 31 22:26:18 EST 2021

git/rebase, git/export: apply/export commits in chronological order

By default, git/query prints commits based on descending commit time.
We want the reverse, so use the newly added -r flag.

--- a/export
+++ b/export
@@ -19,7 +19,7 @@
 q=$*
 if(~ $#q 0)
 	q=HEAD
-commits=`{git/query $q || die $status}
+commits=`{git/query -r $q || die $status}
 n=1
 m=$#commits
 
--- a/rebase
+++ b/rebase
@@ -32,7 +32,7 @@
 		exec aux/usage
 	src=`{git/branch}
 	dst=`{git/query $1}
-	commits=`{git/query $dst $src @ .. $src}
+	commits=`{git/query -r $dst $src @ .. $src}
 	## TODO: edit $commits here for -i
 }