unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Paul Eggert <eggert@cs.ucla.edu>
To: Eli Zaretskii <eliz@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: Patches with independent changes
Date: Sat, 25 Jan 2014 12:58:09 -0800	[thread overview]
Message-ID: <52E42561.4080807@cs.ucla.edu> (raw)
In-Reply-To: <83mwikas8w.fsf@gnu.org>

[-- Attachment #1: Type: text/plain, Size: 1569 bytes --]

Eli Zaretskii wrote:
> otherwise the build would have failed when compiler warnings are
 > turned on and used as errors.

That would have been odd, as other static variables in Emacs are 
declared and set but never used (e.g., category_table_version) and 
evidently these builds are not failing.  It's certainly OK to clean up 
the glitches, but such cleanups are independent changes.

> Then any number of patches can be installed in a single commit,
> because they are all "related" -- after all, they are all about Emacs.

No, that's too broad.  Patches should contain changes that are more 
closely-related than that.

 > you cannot chmod a file that is open ... the chmod call will fail.

Where is this documented?  Does the problem occur if any process has the 
file open, or only if the current process has it open?  What is errno 
after the failure?  This problem does not occur on POSIXish platforms; 
if it happens under Microsoft Windows the incompatibility should be 
documented (in Gnulib, if the problem is generic to GNU applications).

 > the fact that the problem could have been solved in more than
 > one way doesn't mean there are multiple changes involved.

True, but if the problem could have been solved in a simpler way that 
involved fewer changes, then multiple changes were most likely present.

Come to think of it, why is that chmod needed at all in WINDOWSNT?  The 
file is already readable and writeable, so as I understand it chmod 644 
is therefore a no-op on that platform.  If so, the attached patch would 
have been simpler yet, no?

[-- Attachment #2: update1.diff --]
[-- Type: text/x-patch, Size: 335 bytes --]

--- update-game-score.c-old	2014-01-25 08:31:13.065305429 -0800
+++ update-game-score.c	2014-01-25 11:56:15.570846522 -0800
@@ -443,8 +443,10 @@
   fd = mkostemp (tempfile, 0);
   if (fd < 0)
     return -1;
+#ifndef WINDOWSNT
   if (fchmod (fd, 0644) != 0)
     return -1;
+#endif
   f = fdopen (fd, "w");
   if (! f)
     return -1;

  reply	other threads:[~2014-01-25 20:58 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-22 19:42 Changes in update-game-score.c Eli Zaretskii
2014-01-22 19:50 ` David Kastrup
2014-01-22 20:07   ` Eli Zaretskii
2014-01-22 20:10     ` David Kastrup
2014-01-23  1:51     ` Glenn Morris
2014-01-23  3:33       ` Paul Eggert
2014-01-23  3:53         ` Eli Zaretskii
2014-01-23 16:02           ` Eli Zaretskii
2014-01-23  3:58         ` Glenn Morris
2014-01-23  3:32 ` Paul Eggert
2014-01-23  3:52   ` Eli Zaretskii
2014-01-23  3:59     ` Glenn Morris
2014-01-23  4:30       ` Glenn Morris
2014-01-23  4:33         ` Glenn Morris
2014-01-23  4:56     ` Paul Eggert
2014-01-23 16:07       ` Eli Zaretskii
2014-01-23 18:18         ` Paul Eggert
2014-01-23 20:27         ` Juanma Barranquero
2014-01-23 21:50           ` Paul Eggert
2014-01-23 22:39             ` Juanma Barranquero
2014-01-24  7:34             ` Eli Zaretskii
2014-01-24  8:42               ` Paul Eggert
2014-01-24  9:17                 ` Eli Zaretskii
2014-01-24 15:29                   ` Jarek Czekalski
2014-01-24 15:40                     ` Eli Zaretskii
2014-01-24 15:42                     ` change the Subject line when you change topics [was: Changes in update-game-score.c] Drew Adams
2014-01-25 10:00                       ` Jarek Czekalski
2014-01-24 16:43                   ` Patches with independent changes Paul Eggert
2014-01-24 21:39                     ` Eli Zaretskii
2014-01-24 22:34                       ` Paul Eggert
2014-01-25  7:22                         ` Eli Zaretskii
2014-01-25 17:01                           ` Paul Eggert
2014-01-25 17:22                             ` Eli Zaretskii
2014-01-25 17:25                             ` Eli Zaretskii
2014-01-25 20:58                               ` Paul Eggert [this message]
2014-01-26  3:47                                 ` Eli Zaretskii
2014-01-26  7:41                                   ` Paul Eggert

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=52E42561.4080807@cs.ucla.edu \
    --to=eggert@cs.ucla.edu \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).