@@ -96,16 +96,15 @@ cat >expect.typechange <<'EOF' -1 diff--gita/fileb/file newfilemode120000-indexad8b3d2..67be421+indexad8b3d2..8e4020b ---/dev/null +++b/file @@-0,0+1@@ +frotz-\ Nonewlineatendoffile EOF# make a symlink the hard way that works on symlink-challenged file systems test_expect_success'textconv does not act on symlinks''-echo-nfrotz>file&&+echofrotz>file&&gitaddfile&&gitls-files-s|sed-es/100644/120000/|gitupdate-index--index-info&&
@@ -96,16 +96,15 @@ cat >expect.typechange <<'EOF' -1 diff--gita/fileb/file newfilemode120000-indexad8b3d2..67be421+indexad8b3d2..8e4020b ---/dev/null +++b/file @@-0,0+1@@ +frotz-\ Nonewlineatendoffile EOF# make a symlink the hard way that works on symlink-challenged file systems test_expect_success'textconv does not act on symlinks''-echo-nfrotz>file&&+echofrotz>file&&gitaddfile&&gitls-files-s|sed-es/100644/120000/|gitupdate-index--index-info&&
--
1.6.0.3.523.g304d0
This doesn't apply for me. My tip is up-to-date, but it doesn't even have
this file it t/.
A little bewildered,
Ian
From: Brian Gernhardt <hidden> Date: 2016-06-15 22:45:33
On Oct 30, 2008, at 7:52 PM, Ian Hilt wrote:
On Thu, Oct 30, 2008 at 06:12:56PM -0400, Brian Gernhardt wrote:
quoted
Signed-off-by: Brian Gernhardt <redacted>
No commit message???
quoted
"Don't use echo -n" seemed simple enough to me, as it's the only thing
it does. And the reason is that echo -n isn't portable, as has been
determined previously in git. I'll update this and use the better
replacement "printf" anyway.
This doesn't apply for me. My tip is up-to-date, but it doesn't
even have
this file it t/.
This is based on next and is for a file that isn't in master.
~~ Brian
From: Brian Gernhardt <hidden> Date: 2016-06-15 22:45:33
Not all /bin/sh have a builtin echo that recognizes -n. Using printf
is far more portable.
Discovered on OS X 10.5.5 in t4030-diff-textconv.sh and changed in all
the test scripts.
Signed-off-by: Brian Gernhardt <redacted>
---
t/t2005-checkout-index-symlinks.sh | 2 +-
t/t2102-update-index-symlinks.sh | 4 ++--
t/t4030-diff-textconv.sh | 2 +-
t/t6025-merge-symlinks.sh | 4 ++--
t/t9400-git-cvsserver-server.sh | 2 +-
5 files changed, 7 insertions(+), 7 deletions(-)
@@ -13,12 +13,12 @@ even if a plain file is in the working tree if core.symlinks is false.' test_expect_success\'preparation'' gitconfigcore.symlinksfalse&&-l=$(echo-nfile|githash-object-tblob-w--stdin)&&+l=$(printffile|githash-object-tblob-w--stdin)&&echo"120000 $l symlink"|gitupdate-index--index-info' test_expect_success\'modify the symbolic link''-echo-nnew-file>symlink&&+printfnew-file>symlink&& gitupdate-indexsymlink' test_expect_success\
@@ -105,7 +105,7 @@ index ad8b3d2..67be421 EOF# make a symlink the hard way that works on symlink-challenged file systems test_expect_success'textconv does not act on symlinks''-echo-nfrotz>file&&+printffrotz>file&&gitaddfile&&gitls-files-s|sed-es/100644/120000/|gitupdate-index--index-info&&
From: Jeff King <hidden> Date: 2016-06-15 22:45:33
On Fri, Oct 31, 2008 at 01:09:13AM -0400, Brian Gernhardt wrote:
Not all /bin/sh have a builtin echo that recognizes -n. Using printf
is far more portable.
Discovered on OS X 10.5.5 in t4030-diff-textconv.sh and changed in all
the test scripts.
Hmph. I think this is a good patch, and there is precedent in the past
(20fa04ea, 2aad957, 9754563). But I am surprised this was not caught by
our recent autobuilding project.
However, it seems to work on FreeBSD (which makes it doubly weird that
it is broken on OS X). On Solaris, the /bin/sh is so horribly broken
that I have to use bash anyway. Commit 9754563 claims breakage on AIX,
but it looks like Mike is doing the AIX builds with bash.
So I guess we just need an OS X autobuild. ;)
t/t4030-diff-textconv.sh | 2 +-
And of course this one was me, but I blame JSixt, whose test I just
mindlessly copied. ;)
-Peff
From: Pierre Habouzit <hidden> Date: 2016-06-15 22:45:33
On Fri, Oct 31, 2008 at 06:24:56PM +0000, Jeff King wrote:
On Fri, Oct 31, 2008 at 01:09:13AM -0400, Brian Gernhardt wrote:
quoted
Not all /bin/sh have a builtin echo that recognizes -n. Using printf
is far more portable.
Discovered on OS X 10.5.5 in t4030-diff-textconv.sh and changed in all
the test scripts.
Hmph. I think this is a good patch, and there is precedent in the past
(20fa04ea, 2aad957, 9754563). But I am surprised this was not caught by
our recent autobuilding project.
Set up a Debian autobuilder with dash as a /bin/sh (apt-get install
dash, dpkg-reconfigure -plow dash and say 'yes'). You'll see those kind
of problems arise immediately.
Dash is a POSIX compatible shell, with almost no extension added (in
particular its echo has no -n option) which helps to find those kind of
issues.
It would help detecting git shell scripts that use bashism as well.
--
·O· Pierre Habouzit
··O madcoder@debian.org
OOO http://www.madism.org
From: Jeff King <hidden> Date: 2016-06-15 22:45:33
On Fri, Oct 31, 2008 at 07:36:01PM +0100, Pierre Habouzit wrote:
Set up a Debian autobuilder with dash as a /bin/sh (apt-get install
dash, dpkg-reconfigure -plow dash and say 'yes'). You'll see those kind
of problems arise immediately.
I don't need to; my development box is Debian with dash as /bin/sh. :)
Dash is a POSIX compatible shell, with almost no extension added (in
particular its echo has no -n option) which helps to find those kind of
issues.
It would help detecting git shell scripts that use bashism as well.
Agreed, and actually I found such a bashism (test ==) last week (though
of course it also broke on FreeBSD).
-Peff
From: Francis Galiegue <hidden> Date: 2016-06-15 22:45:33
Le Friday 31 October 2008 19:39:33 Jeff King, vous avez écrit :
[...]
Agreed, and actually I found such a bashism (test ==) last week (though
of course it also broke on FreeBSD).
As for bash-isms, a hunt for $(...) also looks necessary...
$ grep -rl '\$([^)]\+)' $(find -type f)|wc -l
272
Unless I'm mistaken (and I probably am), the $(...) construct is
bash-specific, isn't it?
--
Francis Galiegue
ONE2TEAM
Ingénieur système
Mob : +33 (0) 6 83 87 78 75
Tel : +33 (0) 1 78 94 55 52
fge@one2team.com
40 avenue Raymond Poincaré
75116 Paris
From: Mike Ralphson <hidden> Date: 2016-06-15 22:45:34
2008/10/31 Jeff King [off-list ref]:
On Fri, Oct 31, 2008 at 01:09:13AM -0400, Brian Gernhardt wrote:
quoted
Not all /bin/sh have a builtin echo that recognizes -n. Using printf
is far more portable.
Discovered on OS X 10.5.5 in t4030-diff-textconv.sh and changed in all
the test scripts.
Hmph. I think this is a good patch, and there is precedent in the past
(20fa04ea, 2aad957, 9754563). But I am surprised this was not caught by
our recent autobuilding project.
However, it seems to work on FreeBSD (which makes it doubly weird that
it is broken on OS X). On Solaris, the /bin/sh is so horribly broken
that I have to use bash anyway. Commit 9754563 claims breakage on AIX,
but it looks like Mike is doing the AIX builds with bash.
I've just retested with AIX's standard sh (ksh) instead of bash and
there were only two issues.
Oddly enough, one was with the (original) printfs in
t4030-diff-textconv.sh. AIX seems to ship with a perfectly good
printf, but if you install the GNU tools from the 'IBM toolbox for
AIX' (and prepend them to your PATH) it replaces that printf with one
which doesn't grok the "\\1\\n" syntax, but I think wants it to be
"\\01\\n".
The other problem is the 'trap exit' one discussed here:
http://thread.gmane.org/gmane.comp.version-control.git/92748/focus=92944
Mike