about summary refs log tree commit diff
diff options
context:
space:
mode:
authorDaniel Shahaf <d.s@daniel.shahaf.name>2022-01-29 13:10:26 +0000
committerDaniel Shahaf <d.s@daniel.shahaf.name>2022-01-29 16:01:39 +0000
commit75c3664a62010dfae620d77930f8ea5aae78b602 (patch)
treef27c0ab0171bd988795dac86a989e6d638cee845
parent10ee9e5bd74367dcbf598f27d54ceab43ca68374 (diff)
downloadzsh-75c3664a62010dfae620d77930f8ea5aae78b602.tar.gz
zsh-75c3664a62010dfae620d77930f8ea5aae78b602.tar.xz
zsh-75c3664a62010dfae620d77930f8ea5aae78b602.zip
unposted: vcs_info git: Teach the rebase-apply test case generator to also generate rebase-merge test cases
-rw-r--r--ChangeLog5
-rwxr-xr-xFunctions/VCS_Info/test-repo-git-rebase-apply12
l---------Functions/VCS_Info/test-repo-git-rebase-merge1
3 files changed, 17 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index ff9bc0bce..57c26fb38 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2022-01-29  Daniel Shahaf  <d.s@daniel.shahaf.name>
 
+	* unposted: Functions/VCS_Info/test-repo-git-rebase-apply,
+	Functions/VCS_Info/test-repo-git-rebase-merge: vcs_info git:
+	Teach the rebase-apply test case generator to also generate
+	rebase-merge test cases
+
 	* unposted: Functions/VCS_Info/Backends/VCS_INFO_get_data_git:
 	vcs_info git: Add a missing guard against redefining a function.
 
diff --git a/Functions/VCS_Info/test-repo-git-rebase-apply b/Functions/VCS_Info/test-repo-git-rebase-apply
index cb4ea4f58..ce49690cd 100755
--- a/Functions/VCS_Info/test-repo-git-rebase-apply
+++ b/Functions/VCS_Info/test-repo-git-rebase-apply
@@ -44,6 +44,16 @@ append_lines 7 8 9
 # Specify a rebase that would create the history [1,3,4,5,6,7,8,9].
 # This will conflict because r7 depends on r2 which is not included.
 git checkout -b myref
-git rebase --onto=rebase_onto_this rebase_from_this myref
+case $0:P in
+    (*/test-repo-git-rebase-apply)
+        git rebase --onto=rebase_onto_this rebase_from_this myref
+        ;;
+    (*/test-repo-git-rebase-merge)
+        git -c core.editor=true rebase -i --onto=rebase_onto_this rebase_from_this myref
+        ;;
+    (*)
+        echo >&2 "$0: unrecognized basename"
+        ;;
+esac
 
 
diff --git a/Functions/VCS_Info/test-repo-git-rebase-merge b/Functions/VCS_Info/test-repo-git-rebase-merge
new file mode 120000
index 000000000..fce9e9178
--- /dev/null
+++ b/Functions/VCS_Info/test-repo-git-rebase-merge
@@ -0,0 +1 @@
+test-repo-git-rebase-apply
\ No newline at end of file