Re: [PATCH 3/7] test patch hunk editing with "commit -p -m"

4 messages, 3 authors, 2016-06-15 · open the first message on its own page

Re: [PATCH 3/7] test patch hunk editing with "commit -p -m"

From: Junio C Hamano <hidden>
Date: 2016-06-15 23:00:21

Benoit Pierre [off-list ref] writes:
quoted hunk
Add (failing) tests: with commit changing the environment to let hooks
know that no editor will be used (by setting GIT_EDITOR to ":"), the
"edit hunk" functionality does not work (no editor is launched and the
whole hunk is committed).

Signed-off-by: Benoit Pierre <redacted>
---
 t/t7513-commit-patch.sh | 32 ++++++++++++++++++++++++++++++++
 1 file changed, 32 insertions(+)
 create mode 100755 t/t7513-commit-patch.sh
diff --git a/t/t7513-commit-patch.sh b/t/t7513-commit-patch.sh
Again, as I said, I'll rename this to t7514-commit.patch.sh while I
queue this.

Thanks.
quoted hunk
new file mode 100755
index 0000000..9311b0c
--- /dev/null
+++ b/t/t7513-commit-patch.sh
@@ -0,0 +1,32 @@
+#!/bin/sh
+
+test_description='hunk edit with "commit -p -m"'
+. ./test-lib.sh
+
+if ! test_have_prereq PERL
+then
+	skip_all="skipping '$test_description' tests, perl not available"
+	test_done
+fi
+
+test_expect_success 'setup (initial)' '
+	echo line1 >file &&
+	git add file &&
+	git commit -m commit1
+'
+
+test_expect_failure 'edit hunk "commit -p -m message"' '
+	test_when_finished "rm -f editor_was_started" &&
+	echo more >>file &&
+	echo e | env GIT_EDITOR="touch editor_was_started" git commit -p -m commit2 file &&
+	test -r editor_was_started
+'
+
+test_expect_failure 'edit hunk "commit --dry-run -p -m message"' '
+	test_when_finished "rm -f editor_was_started" &&
+	echo more >>file &&
+	echo e | env GIT_EDITOR="touch editor_was_started" git commit -p -m commit3 file &&
+	test -r editor_was_started
+'
+
+test_done

Re: [PATCH 3/7] test patch hunk editing with "commit -p -m"

From: Benoit Pierre <hidden>
Date: 2016-06-15 23:00:21

On Mon, Mar 17, 2014 at 7:49 PM, Junio C Hamano [off-list ref] wrote:
Benoit Pierre [off-list ref] writes:
quoted
Add (failing) tests: with commit changing the environment to let hooks
know that no editor will be used (by setting GIT_EDITOR to ":"), the
"edit hunk" functionality does not work (no editor is launched and the
whole hunk is committed).

Signed-off-by: Benoit Pierre <redacted>
---
 t/t7513-commit-patch.sh | 32 ++++++++++++++++++++++++++++++++
 1 file changed, 32 insertions(+)
 create mode 100755 t/t7513-commit-patch.sh
diff --git a/t/t7513-commit-patch.sh b/t/t7513-commit-patch.sh
Again, as I said, I'll rename this to t7514-commit.patch.sh while I
queue this.
I assumed the "14" was a typo, will rename, but to
t7514-commit-patch.sh right? (with 2 '-').

-- 
A: Because it destroys the flow of conversation.
Q: Why is top posting dumb?

Re: [PATCH 3/7] test patch hunk editing with "commit -p -m"

From: Eric Sunshine <hidden>
Date: 2016-06-15 23:00:21

On Mon, Mar 17, 2014 at 3:46 PM, Benoit Pierre [off-list ref] wrote:
On Mon, Mar 17, 2014 at 7:49 PM, Junio C Hamano [off-list ref] wrote:
quoted
Benoit Pierre [off-list ref] writes:
quoted
Add (failing) tests: with commit changing the environment to let hooks
know that no editor will be used (by setting GIT_EDITOR to ":"), the
"edit hunk" functionality does not work (no editor is launched and the
whole hunk is committed).

Signed-off-by: Benoit Pierre <redacted>
---
 t/t7513-commit-patch.sh | 32 ++++++++++++++++++++++++++++++++
 1 file changed, 32 insertions(+)
 create mode 100755 t/t7513-commit-patch.sh
diff --git a/t/t7513-commit-patch.sh b/t/t7513-commit-patch.sh
Again, as I said, I'll rename this to t7514-commit.patch.sh while I
queue this.
I assumed the "14" was a typo, will rename, but to
t7514-commit-patch.sh right? (with 2 '-').
Yes, two '-'.

In the 'pu' branch, there is a new t7513-interpret-trailers.sh.

Re: [PATCH 3/7] test patch hunk editing with "commit -p -m"

From: Benoit Pierre <hidden>
Date: 2016-06-15 23:00:21

On Mon, Mar 17, 2014 at 8:51 PM, Eric Sunshine [off-list ref] wrote:
On Mon, Mar 17, 2014 at 3:46 PM, Benoit Pierre [off-list ref] wrote:
quoted
On Mon, Mar 17, 2014 at 7:49 PM, Junio C Hamano [off-list ref] wrote:
quoted
Benoit Pierre [off-list ref] writes:
quoted
[...]
diff --git a/t/t7513-commit-patch.sh b/t/t7513-commit-patch.sh
Again, as I said, I'll rename this to t7514-commit.patch.sh while I
queue this.
I assumed the "14" was a typo, will rename, but to
t7514-commit-patch.sh right? (with 2 '-').
Yes, two '-'.

In the 'pu' branch, there is a new t7513-interpret-trailers.sh.
OK.

-- 
A: Because it destroys the flow of conversation.
Q: Why is top posting dumb?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help