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
@ -311,7 +311,7 @@ copy_commit()
|
||||
GIT_COMMITTER_NAME \
|
||||
GIT_COMMITTER_EMAIL \
|
||||
GIT_COMMITTER_DATE
|
||||
(echo -n "$annotate"; cat ) |
|
||||
(printf "%s" "$annotate"; cat ) |
|
||||
git commit-tree "$2" $3 # reads the rest of stdin
|
||||
) || die "Can't copy commit $1"
|
||||
}
|
||||
|
Reference in New Issue
Block a user