From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Sunshine Subject: Re: [PATCH v2 10/16] engine.pl: delete the captured stderr file if empty Date: Sun, 19 Jul 2015 22:01:01 -0400 Message-ID: References: <1437336497-4072-1-git-send-email-philipoakley@iee.org> <1437336497-4072-11-git-send-email-philipoakley@iee.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Cc: Git List , Junio C Hamano , MsysGit List , Yue Lin Ho To: Philip Oakley X-From: msysgit+bncBD2JJCMYYEGBBXNMWGWQKGQECGZZ7EY@googlegroups.com Mon Jul 20 04:01:05 2015 Return-path: Envelope-to: gcvm-msysgit@m.gmane.org Received: from mail-ob0-f192.google.com ([209.85.214.192]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ZH0O6-00027V-Ts for gcvm-msysgit@m.gmane.org; Mon, 20 Jul 2015 04:01:03 +0200 Received: by obbgp5 with SMTP id gp5sf54906100obb.1 for ; Sun, 19 Jul 2015 19:01:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20120806; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=fJ7eWuNoIwzYKAoU6AJCGrU/iGy/kIIMDWJK0+ekkRo=; b=c32Pn6tRGduEd0C5jr1PN/eY7yKArimGRgbhwXAkjG65ZerdSQR5jGJlEFmRioF7QL TTyDKh2A5KH3Fvc3UOLbM6I5tw9BIZMAc9dWKVwivqNGEJg0XGCZYHdIPbkcMK0MOl1H O0huVwcEzamYIjIiwpL5+QBFB3XL0JbDKGPjYW4O6V061J2rM0Gf+g8K/F29OpTnjpmf 4Ihzt0FG4R6+Wj2qDMDNe27Nko175vQEjM5xreNOZCd+5Zvod9g76L64L00w5vYvTRxh T6yAtQzc6CuIzDxX1fAumQkld5+1LwEvxIl6d47F1R/9FaWmLH/XFDz3mIc+ddr0XA2G lVSQ== X-Received: by 10.50.1.66 with SMTP id 2mr121334igk.1.1437357661914; Sun, 19 Jul 2015 19:01:01 -0700 (PDT) X-BeenThere: msysgit@googlegroups.com Received: by 10.107.47.7 with SMTP id j7ls1884741ioo.41.gmail; Sun, 19 Jul 2015 19:01:01 -0700 (PDT) X-Received: by 10.66.253.231 with SMTP id ad7mr29969578pad.45.1437357661432; Sun, 19 Jul 2015 19:01:01 -0700 (PDT) Received: from mail-yk0-x234.google.com (mail-yk0-x234.google.com. [2607:f8b0:4002:c07::234]) by gmr-mx.google.com with ESMTPS id m8si1726917ywb.7.2015.07.19.19.01.01 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 19 Jul 2015 19:01:01 -0700 (PDT) Received-SPF: pass (google.com: domain of ericsunshine@gmail.com designates 2607:f8b0:4002:c07::234 as permitted sender) client-ip=2607:f8b0:4002:c07::234; Received: by mail-yk0-x234.google.com with SMTP id x123so129381032yka.1 for ; Sun, 19 Jul 2015 19:01:01 -0700 (PDT) X-Received: by 10.13.192.132 with SMTP id b126mr25828764ywd.163.1437357661315; Sun, 19 Jul 2015 19:01:01 -0700 (PDT) Sender: msysgit@googlegroups.com Received: by 10.37.12.129 with HTTP; Sun, 19 Jul 2015 19:01:01 -0700 (PDT) In-Reply-To: <1437336497-4072-11-git-send-email-philipoakley@iee.org> X-Original-Sender: sunshine@sunshineco.com X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of ericsunshine@gmail.com designates 2607:f8b0:4002:c07::234 as permitted sender) smtp.mail=ericsunshine@gmail.com Precedence: list Mailing-list: list msysgit@googlegroups.com; contact msysgit+owners@googlegroups.com List-ID: X-Spam-Checked-In-Group: msysgit@googlegroups.com X-Google-Group-Id: 152234828034 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , Archived-At: On Sun, Jul 19, 2015 at 4:08 PM, Philip Oakley wrote: > Keep the build clean of extraneous files if it is indeed clean. > Otherwise leave the msvc-build-makedryerrors.txt file both as > a flag for any CI system or for manual debugging. > > Note that the file will contain the new values of the GIT_VERSION > and GITGUI_VERSION if they were generated by the make file. They > are omitted if the release is tagged and indentically defined in > their respective GIT_VERSION_GEN file DEF_VER variables. > > Signed-off-by: Philip Oakley > --- > diff --git a/contrib/buildsystems/engine.pl b/contrib/buildsystems/engine.pl > index a6999b6..020776e 100755 > --- a/contrib/buildsystems/engine.pl > +++ b/contrib/buildsystems/engine.pl > @@ -77,6 +77,8 @@ EOM > > my $ErrsFile = "msvc-build-makedryerrors.txt"; > @makedry = `cd $git_dir && make -n MSVC=1 V=1 2>$ErrsFile` if !@makedry; > +# test for an empty Errors file and remove it > +for ($ErrsFile) {unlink $_ if (-f $_) && (!-s $_);} Why the 'for' loop? Also, if you're using the 'for' loop for the $_ side-effect, then why not the simpler: for ($ErrsFile) { unlink if -f && !-s; } ? > > # Parse the make output into usable info > parseMakeOutput(); > -- > 2.4.2.windows.1.5.gd32afb6 -- -- *** Please reply-to-all at all times *** *** (do not pretend to know who is subscribed and who is not) *** *** Please avoid top-posting. *** The msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free. You received this message because you are subscribed to the Google Groups "msysGit" group. To post to this group, send email to msysgit@googlegroups.com To unsubscribe from this group, send email to msysgit+unsubscribe@googlegroups.com For more options, and view previous threads, visit this group at http://groups.google.com/group/msysgit?hl=en_US?hl=en --- You received this message because you are subscribed to the Google Groups "Git for Windows" group. To unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com. For more options, visit https://groups.google.com/d/optout.