From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Paul Eggert Newsgroups: gmane.emacs.devel Subject: Re: Patches with independent changes Date: Sat, 25 Jan 2014 09:01:21 -0800 Organization: UCLA Computer Science Department Message-ID: <52E3EDE1.9050709@cs.ucla.edu> References: <8361pbg5vy.fsf@gnu.org> <52E08D31.3080801@cs.ucla.edu> <8338kffj7m.fsf@gnu.org> <52E0A0ED.4020601@cs.ucla.edu> <83y526el6z.fsf@gnu.org> <52E18EC0.7090302@cs.ucla.edu> <83lhy5ests.fsf@gnu.org> <52E2277B.9000205@cs.ucla.edu> <83bnz1eo1x.fsf@gnu.org> <52E29827.7060209@cs.ucla.edu> <83ha8tcb4z.fsf@gnu.org> <52E2EA7B.2080501@cs.ucla.edu> <83fvoccyqt.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------080009040506000507010208" X-Trace: ger.gmane.org 1390669302 17803 80.91.229.3 (25 Jan 2014 17:01:42 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 25 Jan 2014 17:01:42 +0000 (UTC) Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Jan 25 18:01:49 2014 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1W76c9-0003Zt-6K for ged-emacs-devel@m.gmane.org; Sat, 25 Jan 2014 18:01:49 +0100 Original-Received: from localhost ([::1]:51950 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W76c8-00065h-4U for ged-emacs-devel@m.gmane.org; Sat, 25 Jan 2014 12:01:48 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49371) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W76bz-0005uS-0M for emacs-devel@gnu.org; Sat, 25 Jan 2014 12:01:46 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W76br-0007pm-NE for emacs-devel@gnu.org; Sat, 25 Jan 2014 12:01:38 -0500 Original-Received: from smtp.cs.ucla.edu ([131.179.128.62]:52730) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W76bj-0007oC-QP; Sat, 25 Jan 2014 12:01:23 -0500 Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp.cs.ucla.edu (Postfix) with ESMTP id 8815D39E8017; Sat, 25 Jan 2014 09:01:22 -0800 (PST) X-Virus-Scanned: amavisd-new at smtp.cs.ucla.edu Original-Received: from smtp.cs.ucla.edu ([127.0.0.1]) by localhost (smtp.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id bFIuj6rOaMkb; Sat, 25 Jan 2014 09:01:22 -0800 (PST) Original-Received: from [192.168.1.9] (pool-108-0-233-62.lsanca.fios.verizon.net [108.0.233.62]) by smtp.cs.ucla.edu (Postfix) with ESMTPSA id 1627139E8014; Sat, 25 Jan 2014 09:01:22 -0800 (PST) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 In-Reply-To: <83fvoccyqt.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 131.179.128.62 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:169067 Archived-At: This is a multi-part message in MIME format. --------------080009040506000507010208 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Eli Zaretskii wrote: > There was no second change. Sure there was. It would have been easy to apply a simpler patch that contained just the single change needed to fix the porting bug, namely to call chmod rather than fchmod (attached). Instead, you applied a more-complicated patch that contained multiple independent changes. Moving on to trunk bzr 116064: >> These independent changes weren't needed to fix the bug. > > Yes, they were needed Obviously they were not needed to fix the bug, as the bug would have been fixed without them. They were "needed" only in the sense that it's nicer for maintainers and users if Emacs is simpler and smaller. It was reasonable to apply those changes while you were in the neighborhood, but they could have been applied as separate and independent patches (not that I recommend this -- I think the patch was fine as-is). > Your changes were different in kind I don't see why. We all install patches containing multiple independent changes, only some of which are needed to fix a bug. And that's OK. The important thing is that changes in a patch should all be related, so that it makes sense to install them together. It's not always essential or even advisable to separate changes into different patches merely because the changes are independent. --------------080009040506000507010208 Content-Type: text/x-patch; name="update.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="update.diff" --- update-game-score.c-old 2014-01-25 08:31:13.065305429 -0800 +++ update-game-score.c 2014-01-25 08:31:54.337506871 -0800 @@ -443,8 +443,13 @@ fd = mkostemp (tempfile, 0); if (fd < 0) return -1; +#ifdef WINDOWSNT + if (chmod (tempfile, 0644) != 0) + return -1; +#else if (fchmod (fd, 0644) != 0) return -1; +#endif f = fdopen (fd, "w"); if (! f) return -1; --------------080009040506000507010208--