Re: [PATCH v2 01/10] ls-files: add --json to dump the index
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Jun 25, 2019, 09:44 UTC
- Message-ID
- <nycvar.QRO.7.76.6.1906251142580.44@tvgsbejvaqbjf.bet>
- In-Reply-To
- <20190624130226.17293-2-pclouds@gmail.com>
Hi Duy,
On Mon, 24 Jun 2019, Nguyễn Thái Ngọc Duy wrote:
Show 15 quoted lines
> diff --git a/t/t3011-ls-files-json.sh b/t/t3011-ls-files-json.sh
> new file mode 100755
> index 0000000000..97bcd814be
> --- /dev/null
> +++ b/t/t3011-ls-files-json.sh
> @@ -0,0 +1,44 @@
> +#!/bin/sh
> +
> +test_description='ls-files dumping json'
> +
> +. ./test-lib.sh
> +
> +strip_number() {
> + for name; do
> + echo 's/\("'$name'":\) [0-9]\+/\1 <number>/' >>filter.sedThis does not do what you think it does, in Ubuntu Xenial and on macOS:
https://dev.azure.com/gitgitgadget/git/_build/results?buildId=11408&view=ms.vss-test-web.build-test-results-tab&runId=27736&paneView=debug&resultId=105613
The `\1` is expanded to the ASCII character 001. Therefore your test cases fail on almost all platforms.
Funnily enough, they pass on Windows...
Ciao, Johannes