Thread (4 messages) flat view 4 messages, 3 authors, 2016-06-15

Re: [PATCH v5 1/7] add simple tests of consistency across rebase types

From: Martin von Zweigbergk <hidden>
Date: 2016-06-15 22:57:33

On Mon, Jun 3, 2013 at 3:28 PM, Junio C Hamano [off-list ref] wrote:
quoted
+
+# checks that the revisions in "$2" represent a linear range with the
+# subjects in "$1"
+test_linear_range () {
+     ! { git log --format=%p "$2" | sane_grep " " ;} &&
An interesting way to spell:

    test $(git rev-list --merges "$2" | wc -l) = 0
Heh, true. I'll change that. ("My" version was based on the one in
git-rebase.sh, around line 495.)
quoted
+reset_rebase () {
+     git rebase --abort # may fail; ignore exit code
test_might_fail to catch unusual exit codes?
Will change.
quoted
+# a---b---c
+#      \
+#       d---e
quoted
+test_run_rebase () {
+     result=$1
+     shift
+     test_expect_$result "rebase $* fast-forwards if an ancestor of upstream" "
The description is a non-sentence, and while I can tell what it
wants to say, I do not have a good suggestion for rephrasing this.
Changing description to "... fast-forwards from an ancestor of upstream".
This is asking to rebase the history leading to b on top of e, but e
already includes everything in b, so it just turns into a no-op of
not moving from e.  So it is not even a fast-forward.
quoted
+             reset_rebase &&
+             git rebase $* e b &&
+             test_cmp_rev e HEAD
Well, "git rebase e b" is of course a kind of short form of "git
checkout b && git rebase e". While it's true that the implementation
doesn't bother checking out b first, that's just an optimization, but
let me know if you meant something else.

Thanks. Will wait another day or two for further comments before I
send another version.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help