Avoid using echo -n
anywhere
`echo -n` is non-portable. The POSIX specification says: Conforming applications that wish to do prompting without <newline> characters or that could possibly be expecting to echo a -n, should use the printf utility derived from the Ninth Edition system. Since all of the affected shell scripts use a POSIX shell shebang, replace `echo -n` invocations with printf. Signed-off-by: Lukas Fleischer <git@cryptocrack.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
f59bebb78e
commit
19c3c5fdcb
@ -182,9 +182,9 @@ test_expect_success 'merge new subproj history into subdir' '
|
||||
test_expect_success 'Check that prefix argument is required for split' '
|
||||
echo "You must provide the --prefix option." > expected &&
|
||||
test_must_fail git subtree split > actual 2>&1 &&
|
||||
test_debug "echo -n expected: " &&
|
||||
test_debug "printf '"'"'expected: '"'"'" &&
|
||||
test_debug "cat expected" &&
|
||||
test_debug "echo -n actual: " &&
|
||||
test_debug "printf '"'"'actual: '"'"'" &&
|
||||
test_debug "cat actual" &&
|
||||
test_cmp expected actual &&
|
||||
rm -f expected actual
|
||||
@ -193,9 +193,9 @@ test_expect_success 'Check that prefix argument is required for split' '
|
||||
test_expect_success 'Check that the <prefix> exists for a split' '
|
||||
echo "'"'"'non-existent-directory'"'"'" does not exist\; use "'"'"'git subtree add'"'"'" > expected &&
|
||||
test_must_fail git subtree split --prefix=non-existent-directory > actual 2>&1 &&
|
||||
test_debug "echo -n expected: " &&
|
||||
test_debug "printf '"'"'expected: '"'"'" &&
|
||||
test_debug "cat expected" &&
|
||||
test_debug "echo -n actual: " &&
|
||||
test_debug "printf '"'"'actual: '"'"'" &&
|
||||
test_debug "cat actual" &&
|
||||
test_cmp expected actual
|
||||
# rm -f expected actual
|
||||
|
Reference in New Issue
Block a user