From: Junio C Hamano <gitster@pobox.com>
To: Ben Walton <bwalton@artsci.utoronto.ca>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] Work around sed portability issue in t8006-blame-textconv
Date: Tue, 03 Jan 2012 11:05:58 -0800 [thread overview]
Message-ID: <7vd3b0vc6h.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <1325339068-6063-1-git-send-email-bwalton@artsci.utoronto.ca> (Ben Walton's message of "Sat, 31 Dec 2011 08:44:28 -0500")
Ben Walton <bwalton@artsci.utoronto.ca> writes:
> In test 'blame --textconv with local changes' of t8006-blame-textconv,
> using /usr/xpg4/bin/sed on Solaris as set by SANE_TOOL_PATH, an
> additional newline was added to the output from the 'helper' script
> driven by git attributes.
>
> This was noted by sed with a message such as:
> sed: Missing newline at end of file zero.bin.
>
> In turn, this was triggering a fatal error from git blame:
> fatal: unable to read files to diff
Interesting. A file with incomplete line technically is not a text file
and sed is supposed to work on text files, so it is allowed to be picky.
> Use perl -p -e instead of sed -e to work around this portability issue
> as it will not insert the newline.
I am not sure if additional newline is the problem, or the exit status
from sed is, from your description. Your first paragraph says you will get
output from sed but with an extra newline, and then later you said blame
noticed an error in its attempt to read the contents. I am suspecting that
it checked the exit status from the textconv subprocess and noticed the
error and that is the cause of the issue, but could you clarify? IOW, I
am suspecting that replacing "as it will not insert the newline" with "as
it does not error out on an incomplete line" is necessary in this
sentence.
Thanks.
next prev parent reply other threads:[~2012-01-03 19:06 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-31 13:44 [PATCH] Work around sed portability issue in t8006-blame-textconv Ben Walton
2012-01-03 19:05 ` Junio C Hamano [this message]
2012-01-06 22:53 ` Junio C Hamano
2012-01-09 3:40 ` Ben Walton
2012-01-10 2:47 ` [PATCH 0/1] Re-roll of the test fix for sed on solaris Ben Walton
2012-01-10 2:47 ` [PATCH] Use perl instead of sed for t8006-blame-textconv test Ben Walton
2012-01-10 4:46 ` [PATCH 0/1] Re-roll of the test fix for sed on solaris Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7vd3b0vc6h.fsf@alter.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=bwalton@artsci.utoronto.ca \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).