Thread (20 messages) flat view 20 messages, 6 authors, 2016-06-15

Re: [PATCH/RFC 7/7] t2016 (checkout -p): use printf for multiline y/n input

From: Jonathan Nieder <hidden>
Date: 2016-06-15 22:49:30
Subsystem: the rest · Maintainer: Linus Torvalds

Thomas Rast wrote:
I'm indifferent about this.  It does save a process, but (maybe that's
just me though) I had to look up a POSIX manpage to verify that the
repeating behaviour is guaranteed.
If saving a process is the only benefit, let's forget it.
quoted
While at it, add a missing && to the "git checkout -p HEAD with change
already staged" test.
Good catch.
Here's a patch with just that.

-- 8< --
Subject: t2016 (checkout -p): add missing &&

Although the set_state command is not likely to fail, it is best to
stay in the habit of checking for failures.

Cc: Thomas Rast <redacted>
Signed-off-by: Jonathan Nieder <redacted>
---
 t/t2016-checkout-patch.sh |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/t/t2016-checkout-patch.sh b/t/t2016-checkout-patch.sh
index 7657ec1..a463b13 100755
--- a/t/t2016-checkout-patch.sh
+++ b/t/t2016-checkout-patch.sh
@@ -52,7 +52,7 @@ test_expect_success PERL 'git checkout -p HEAD with NO staged changes: apply' '
 '
 
 test_expect_success PERL 'git checkout -p HEAD with change already staged' '
-	set_state dir/foo index index
+	set_state dir/foo index index &&
 	# the third n is to get out in case it mistakenly does not apply
 	(echo n; echo y; echo n) | git checkout -p HEAD &&
 	verify_saved_state bar &&
-- 
1.7.2.3
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help