git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: t0005-signals.sh fails with ksh

From
Eevgeny <illumsoft.org@gmail.com>
Date
May 8, 2015, 23:43 UTC
Message-ID
<479525721.20150509024300@gmail.com>
In-Reply-To
<xmqqk2wiiwa3.fsf@gitster.dls.corp.google.com>

Hi, just for information about ksh on Linux and OpenIndiana

           ksh93 on Debian GNU/Linux 7 (wheezy)
$ ksh --version
  version         sh (AT&T Research) 93u+ 2012-02-29

$ git init foo && cd foo Initialized empty Git repository in /var/tmp/foo/.git/ $ (cd .git/objects && ls) info pack $ mkdir subdir && cd subdir $ ls ../.git/objects info pack $ cd ../.git/objects /bin/ksh93: cd: /var/tmp/foo/git/objects: [No such file or directory]

           ksh93 on OpenIndiana oi_151.1.9 X86
$ ksh --version
  version         sh (AT&T Research) 93t+ 2010-03-05

$ pwd /var/tmp $ git init foo && cd foo Initialized empty Git repository in /var/tmp/foo/.git/ $ (cd .git/objects && ls) info pack $ mkdir subdir && cd subdir $ ls ../.git/objects info pack $ cd ../.git/objects $ pwd /var/tmp/foo/.git/objects

Looks like older version (or Solaris version?) of ksh did not have this bug.
Saturday, May 9, 2015, 12:39:32 AM, you wrote:
> Jeff King <peff@peff.net> writes:
Show 17 quoted lines
>> Here's an oddity I isolated based on a failure in t5502:
>>
>>   $ git init foo && cd foo
>>   Initialized empty Git repository in /home/peff/foo/.git/
>>
>>   $ (cd .git/objects && ls)
>>   info pack
>>
>> OK, makes sense. Now...
>>
>>   $ mkdir subdir && cd subdir
>>   $ ls ../.git/objects
>>   info  pack
>>   $ cd ../.git/objects
>>   ksh: cd: /home/peff/foo/git/objects: [No such file or directory]
>>
>> Um, what? Apparently using "../.foo" will eat the "." off of "foo"?
> That is fun.  And doing
>     $ mkdir -p git/objects
> just before you create and chdir into subdir does tell me that the
> last "cd ../.git/objects" is turned into "cd ../git/objects".
> Actually, with that extra thing, changing the last one to
>     $ cd ../..git/objects
> still takes me to ../git/objects, it seems.  But lookie here:
>     $ cd ../.....git/objects
>     ksh: cd: /var/tmp/x/ksh/...git/objects: [No such file or directory]
> WAT.
> I am tempted to say that we should write it off as utterly broken.
-- 
Best regards,
 evgeny                            mailto:illumsoft.org@gmail.com
Previous: Junio C HamanoNext: Andreas Schwab
Message 6 of 11 in “t0005-signals.sh fails with ksh”
  1. evgenyMay 8, 2015
  2. Junio C HamanoMay 8, 2015
  3. Jeff KingMay 8, 2015
  4. Jeff KingMay 8, 2015
  5. Junio C HamanoMay 8, 2015
  6. evgenyMay 8, 2015
  7. Andreas SchwabMay 9, 2015
  8. Junio C HamanoMay 8, 2015
  9. Jeff KingMay 8, 2015
  10. brian m. carlsonMay 9, 2015
  11. evgenyMay 8, 2015

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.