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

bug in t3700-add.sh?

From
Nguyen Thai Ngoc Duy <pclouds@gmail.com>
Date
Aug 3, 2007, 20:51 UTC
Message-ID
<fcaeb9bf0708031351g5e585a4bj849fbf2ec3720a18@mail.gmail.com>
Hi,
Running test 17, I got this output:
* expecting success:
        git rm --cached -f file symlink &&
        (
                echo "100644 $(git hash-object -w stage1) 1     file"
                echo "100755 $(git hash-object -w stage2) 2     file"
                echo "100644 $(printf $s | git hash-object -w -t blob
--stdin) 1        symlink"
                echo "120000 $(printf $s | git hash-object -w -t blob
--stdin) 2        symlink"
        ) | git update-index --index-info &&
        git config core.filemode 0 &&
        git config core.symlinks 0 &&
        echo new > file &&
        echo new > symlink &&
        git add file symlink &&
        git ls-files --stage | grep "^100755 .* 0       file$" &&
        git ls-files --stage | grep "^120000 .* 0       symlink$"
rm 'file'
rm 'symlink'
printf: usage: printf [-v var] format [arguments]
printf: usage: printf [-v var] format [arguments]
100755 3e757656cf36eca53338e520d134963a44f793f8 0       file
120000 3e757656cf36eca53338e520d134963a44f793f8 0       symlink
*   ok 17: git add with filemode=0, symlinks=0 prefers stage 2 over stage 1

I don't know if "printf $s" was intentional because $s was empty and caused printf to print out help usage. I have feeling that there is something wrong here. Anyone can clarify?

Johannes Sixt CC'd as he added this code.
-- 
Duy
Next: Junio C Hamano
Message 1 of 3 in “bug in t3700-add.sh?”
  1. Nguyen Thai Ngoc DuyAug 3, 2007
  2. Junio C HamanoAug 3, 2007
  3. Junio C HamanoAug 3, 2007

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.