From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS31976 209.132.180.0/23 X-Spam-Status: No, score=-3.7 required=3.0 tests=AWL,BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by dcvr.yhbt.net (Postfix) with ESMTP id 1C9E71F45E for ; Thu, 13 Feb 2020 19:22:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728395AbgBMTWu (ORCPT ); Thu, 13 Feb 2020 14:22:50 -0500 Received: from smtprelay05.ispgateway.de ([80.67.31.97]:20760 "EHLO smtprelay05.ispgateway.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727919AbgBMTWu (ORCPT ); Thu, 13 Feb 2020 14:22:50 -0500 Received: from [84.175.183.167] (helo=[192.168.2.6]) by smtprelay05.ispgateway.de with esmtpsa (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.92.3) (envelope-from ) id 1j2K4U-0004J5-Li; Thu, 13 Feb 2020 20:22:46 +0100 Subject: Re: [PATCH] mingw: workaround for hangs when sending STDIN To: Eric Sunshine , Alexandr Miloslavskiy via GitGitGadget Cc: Git List , Paul-Sebastian Ungureanu , Erik Faye-Lund References: From: Alexandr Miloslavskiy Message-ID: Date: Thu, 13 Feb 2020 20:22:47 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 7bit X-Df-Sender: YWxleGFuZHIubWlsb3NsYXZza2l5QHN5bnRldm8uY29t Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org On 13.02.2020 19:56, Eric Sunshine wrote: >> clogged while it's trying to deal with 8MB of STDIN. Such deadlocks >> could be defeated with writing less then pipe's buffer size per > > s/then/than/ > >> of pending reads. Therefore, if buffer is bigger then size of reads, > > s/then/than/ > >> +test_expect_success 'stash handles large files' ' >> + printf "%1023s\n%.0s" "x" {1..16384} >large_file.txt && >> + git stash push --include-untracked -- large_file.txt >> +' > > Use of {1..16384} is not portable across shells. You should be able to > achieve something similar by assigning a really large value to a shell > variable and then echoing that value to "large_file.txt". Something > like: > > x=0123456789 > x=$x$x$x$x$x$x$x$x$x$x > x=$x$x$x$x$x$x$x$x$x$x > ...and so on... > echo $x >large_file.txt && > > or any other similar construct. Thanks for having a look! I will address these in V2 next week.