{"thread":{"id":"51411","subject":"[PATCH 0/1] Fix test bug with spaces in file owner","startedAt":"2019-07-01T13:16:22Z","lastAt":"2019-07-02T17:25:20Z","messageCount":4,"participants":["Derrick Stolee via GitGitGadget","Johannes Schindelin","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":1},"messages":[{"id":"378380","messageId":"pull.280.git.gitgitgadget@gmail.com","threadId":"51411","inReplyTo":null,"subject":"[PATCH 0/1] Fix test bug with spaces in file owner","fromName":"Derrick Stolee via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2019-07-01T13:16:19Z","receivedAt":"2019-07-01T13:16:22Z","isPatch":true,"sender":{"key":"stolee@gmail.com","avatar":"https://avatars.githubusercontent.com/u/570044?v=4"},"body":"Thanks to Johannes Sixt for reporting this bug and Dscho for presenting the\ncorrect test-tool to use.\n\nThis applies on ds/midx-expire-repack. If we instead want to squash this\ninto that branch, the two hunks will need to be squashed into these commits:\n\nTHIRD_SMALLEST_SIZE applies to ce1e4a105b4 (midx: implement midx_repack(),\n2019-06-10).\n\nMINSIZE applies to 2af890bb280 (multi-pack-index: prepare 'repack'\nsubcommand, 2019-06-10).\n\nThanks, -Stolee\n\nDerrick Stolee (1):\n  t5319: use 'test-tool path-utils' instead of 'ls -l'\n\n t/t5319-multi-pack-index.sh | 4 ++--\n 1 file changed, 2 insertions(+), 2 deletions(-)\n\n\nbase-commit: b526d8cbbb8740faa10411caa757c6586395fcab\nPublished-As: https://github.com/gitgitgadget/git/releases/tag/pr-280%2Fderrickstolee%2Fmidx-test-fix-v1\nFetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-280/derrickstolee/midx-test-fix-v1\nPull-Request: https://github.com/gitgitgadget/git/pull/280\n-- \ngitgitgadget\n"},{"id":"378381","messageId":"fec75453eb3e4c286f84c538c142c3da02f75826.1561986978.git.gitgitgadget@gmail.com","threadId":"51411","inReplyTo":"pull.280.git.gitgitgadget@gmail.com","subject":"[PATCH 1/1] t5319: use 'test-tool path-utils' instead of 'ls -l'","fromName":"Derrick Stolee via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2019-07-01T13:16:19Z","receivedAt":"2019-07-01T13:16:23Z","isPatch":true,"sender":{"key":"stolee@gmail.com","avatar":"https://avatars.githubusercontent.com/u/570044?v=4"},"body":"From: Derrick Stolee <dstolee@microsoft.com>\n\nUsing 'ls -l' and parsing the columns to find file sizes is\nproblematic when the platform could report the owner as a name\nwith spaces. Instead, use the 'test-tool path-utils file-size'\ncommand to list only the sizes.\n\nReported-by: Johannes Sixt <j6t@kdbg.org>\nHelped-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>\nSigned-off-by: Derrick Stolee <dstolee@microsoft.com>\n---\n t/t5319-multi-pack-index.sh | 4 ++--\n 1 file changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/t/t5319-multi-pack-index.sh b/t/t5319-multi-pack-index.sh\nindex 79bfaeafa9..c72ca04399 100755\n--- a/t/t5319-multi-pack-index.sh\n+++ b/t/t5319-multi-pack-index.sh\n@@ -443,7 +443,7 @@ test_expect_success 'repack with minimum size does not alter existing packs' '\n \t\ttouch -m -t 201901010002 .git/objects/pack/pack-B* &&\n \t\ttouch -m -t 201901010003 .git/objects/pack/pack-A* &&\n \t\tls .git/objects/pack >expect &&\n-\t\tMINSIZE=$(ls -l .git/objects/pack/*pack | awk \"{print \\$5;}\" | sort -n | head -n 1) &&\n+\t\tMINSIZE=$(test-tool path-utils file-size .git/objects/pack/*pack | sort -n | head -n 1) &&\n \t\tgit multi-pack-index repack --batch-size=$MINSIZE &&\n \t\tls .git/objects/pack >actual &&\n \t\ttest_cmp expect actual\n@@ -455,7 +455,7 @@ test_expect_success 'repack creates a new pack' '\n \t\tcd dup &&\n \t\tls .git/objects/pack/*idx >idx-list &&\n \t\ttest_line_count = 5 idx-list &&\n-\t\tTHIRD_SMALLEST_SIZE=$(ls -l .git/objects/pack/*pack | awk \"{print \\$5;}\" | sort -n | head -n 3 | tail -n 1) &&\n+\t\tTHIRD_SMALLEST_SIZE=$(test-tool path-utils file-size .git/objects/pack/*pack | sort -n | head -n 3 | tail -n 1) &&\n \t\tBATCH_SIZE=$(($THIRD_SMALLEST_SIZE + 1)) &&\n \t\tgit multi-pack-index repack --batch-size=$BATCH_SIZE &&\n \t\tls .git/objects/pack/*idx >idx-list &&\n-- \ngitgitgadget\n"},{"id":"378491","messageId":"nycvar.QRO.7.76.6.1907021202000.48@tvgsbejvaqbjf.bet","threadId":"51411","inReplyTo":"fec75453eb3e4c286f84c538c142c3da02f75826.1561986978.git.gitgitgadget@gmail.com","subject":"Re: [PATCH 1/1] t5319: use 'test-tool path-utils' instead of 'ls -l'","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2019-07-02T12:06:21Z","receivedAt":"2019-07-02T12:06:34Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Stolee,\n\nOn Mon, 1 Jul 2019, Derrick Stolee via GitGitGadget wrote:\n\n> From: Derrick Stolee <dstolee@microsoft.com>\n>\n> Using 'ls -l' and parsing the columns to find file sizes is\n> problematic when the platform could report the owner as a name\n> with spaces. Instead, use the 'test-tool path-utils file-size'\n> command to list only the sizes.\n\nThank you!\n\n> diff --git a/t/t5319-multi-pack-index.sh b/t/t5319-multi-pack-index.sh\n> index 79bfaeafa9..c72ca04399 100755\n> --- a/t/t5319-multi-pack-index.sh\n> +++ b/t/t5319-multi-pack-index.sh\n> @@ -443,7 +443,7 @@ test_expect_success 'repack with minimum size does not alter existing packs' '\n>  \t\ttouch -m -t 201901010002 .git/objects/pack/pack-B* &&\n>  \t\ttouch -m -t 201901010003 .git/objects/pack/pack-A* &&\n>  \t\tls .git/objects/pack >expect &&\n> -\t\tMINSIZE=$(ls -l .git/objects/pack/*pack | awk \"{print \\$5;}\" | sort -n | head -n 1) &&\n> +\t\tMINSIZE=$(test-tool path-utils file-size .git/objects/pack/*pack | sort -n | head -n 1) &&\n\nYou know, we could also add a `--show-minimum` option...\n\n> @@ -455,7 +455,7 @@ test_expect_success 'repack creates a new pack' '\n>  \t\tcd dup &&\n>  \t\tls .git/objects/pack/*idx >idx-list &&\n>  \t\ttest_line_count = 5 idx-list &&\n> -\t\tTHIRD_SMALLEST_SIZE=$(ls -l .git/objects/pack/*pack | awk \"{print \\$5;}\" | sort -n | head -n 3 | tail -n 1) &&\n> +\t\tTHIRD_SMALLEST_SIZE=$(test-tool path-utils file-size .git/objects/pack/*pack | sort -n | head -n 3 | tail -n 1) &&\n\nI guess the `--show-minimum` option is no longer such a smart idea ;-)\n\nPatch looks good, thanks for working on this,\nDscho\n\n>  \t\tBATCH_SIZE=$(($THIRD_SMALLEST_SIZE + 1)) &&\n>  \t\tgit multi-pack-index repack --batch-size=$BATCH_SIZE &&\n>  \t\tls .git/objects/pack/*idx >idx-list &&\n> --\n> gitgitgadget\n>\n"},{"id":"378505","messageId":"xmqqimsk4adg.fsf@gitster-ct.c.googlers.com","threadId":"51411","inReplyTo":"nycvar.QRO.7.76.6.1907021202000.48@tvgsbejvaqbjf.bet","subject":"Re: [PATCH 1/1] t5319: use 'test-tool path-utils' instead of 'ls -l'","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2019-07-02T17:25:15Z","receivedAt":"2019-07-02T17:25:20Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:\n\n> Hi Stolee,\n>\n> On Mon, 1 Jul 2019, Derrick Stolee via GitGitGadget wrote:\n>\n>> From: Derrick Stolee <dstolee@microsoft.com>\n>>\n>> Using 'ls -l' and parsing the columns to find file sizes is\n>> problematic when the platform could report the owner as a name\n>> with spaces. Instead, use the 'test-tool path-utils file-size'\n>> command to list only the sizes.\n>\n> Thank you!\n\nYup.  Sounds good.\n"}]}