Re: [PATCH v4 2/3] range-diff/format-patch: handle commit ranges other than A..B

2 messages, 2 authors, 2021-02-04 · open the first message on its own page

Re: [PATCH v4 2/3] range-diff/format-patch: handle commit ranges other than A..B

From: Junio C Hamano <hidden>
Date: 2021-02-04 19:00:49

"Johannes Schindelin via GitGitGadget" [off-list ref]
writes:
+test_expect_success 'A^! and A^-<n> (unmodified)' '
+	git range-diff --no-color topic^! unmodified^-1 >actual &&
+	cat >expect <<-EOF &&
+	1:  $(test_oid t4) = 1:  $(test_oid u4) s/12/B/
+	EOF
+	test_cmp expect actual
+'
Now we actually parse the single-token range, instead of relying on
"does it have dot-dot" heuristics, we can make sure that we reject

    "HEAD^{/^string with .. in it}"

as "not a range with negative and positive ends".

Re: [PATCH v4 2/3] range-diff/format-patch: handle commit ranges other than A..B

From: Johannes Schindelin <hidden>
Date: 2021-02-04 21:58:52

Hi Junio,

On Thu, 4 Feb 2021, Junio C Hamano wrote:
"Johannes Schindelin via GitGitGadget" [off-list ref]
writes:
quoted
+test_expect_success 'A^! and A^-<n> (unmodified)' '
+	git range-diff --no-color topic^! unmodified^-1 >actual &&
+	cat >expect <<-EOF &&
+	1:  $(test_oid t4) = 1:  $(test_oid u4) s/12/B/
+	EOF
+	test_cmp expect actual
+'
Now we actually parse the single-token range, instead of relying on
"does it have dot-dot" heuristics, we can make sure that we reject

    "HEAD^{/^string with .. in it}"

as "not a range with negative and positive ends".
Sure, why not.

Ciao,
Dscho
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help