On 12/01/2014 10:55 PM, KO Myung-Hun wrote: > Subject: [PATCH] git-version-gen: do not print new line characters > > * build-aux/git-version-gen: Use printf instead of echo and tr.
This commit message says what, but lacks why; the next reader might appreciate knowing that some versions of 'echo' output CRLF by default on non-posix systems, as the justification for the change. > --- > build-aux/git-version-gen | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/build-aux/git-version-gen b/build-aux/git-version-gen > index 47d6576..0dd6f7c 100755 > --- a/build-aux/git-version-gen > +++ b/build-aux/git-version-gen > @@ -215,7 +215,7 @@ if test "x$v_from_git" != x; then > fi > > # Omit the trailing newline, so that m4_esyscmd can use the result directly. > -echo "$v" | tr -d "$nl" > +printf '%s' "$v" The '' are not strictly required (%s does not contain shell metacharacters). Also, when touching this file, you need to update $scriptversion at the head of the file (editing in emacs does it automatically). I fixed those items, added a ChangeLog entry, and pushed. -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature