all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Paul Eggert <eggert@cs.ucla.edu>
Cc: emacs-devel@gnu.org
Subject: Re: Patches with independent changes
Date: Sat, 25 Jan 2014 09:22:02 +0200	[thread overview]
Message-ID: <83fvoccyqt.fsf@gnu.org> (raw)
In-Reply-To: <52E2EA7B.2080501@cs.ucla.edu>

> Date: Fri, 24 Jan 2014 14:34:35 -0800
> From: Paul Eggert <eggert@cs.ucla.edu>
> CC: emacs-devel@gnu.org
> 
> On 01/24/2014 01:39 PM, Eli Zaretskii wrote:
> 
> > they both address the fact that fchmod is not available on Windows. 
> > One without the other would break the build on Windows.
> 
> I wasn't referring to two hunks in the patch. I was referring to two of 
> the changes installed by that patch. One change worked around 
> WINDOWSNT's lack of fchmod, and the other replaced "!=" with "<".The 
> changes were independent and only the first change was needed to fix the 
> bug.

There was no second change.  There were 2 hunks in a single change
that fixed a single problem:

=== modified file 'lib-src/update-game-score.c'
--- lib-src/update-game-score.c	2014-01-22 19:02:41 +0000
+++ lib-src/update-game-score.c	2014-01-22 19:38:31 +0000
@@ -443,8 +443,10 @@ write_scores (const char *filename, cons
   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;
@@ -457,6 +459,10 @@ write_scores (const char *filename, cons
     return -1;
   if (rename (tempfile, filename) != 0)
     return -1;
+#ifdef WINDOWSNT
+  if (chmod (filename, 0644) < 0)
+    return -1;
+#endif
   return 0;
 }
 
I didn't change anything in the call to fchmod, except conditioning it
on non-Windows build.  The code that calls chmod instead was added,
and it used < from the get-go.  So there's no second change, the two
hunks were strictly required to make the code compile on Windows.

> > That I used < rather than != is immaterial
> 
> You thought replacing "!=" with "<" was needed, so the intent of that 
> patch was to install multiple independent fixes. Which was fine.

I didn't replace anything, the line with chmod was _added_ in its
entirety.

> Here's another example. Trunk bzr 116064 fixes a file name handling 
> failure on MS-Windows 9X. While it's in the neighborhood, it makes the 
> independent changes of removing initialization code for the variable 
> g_b_init_is_w9x, and of removing that variable's definition. These 
> independent changes weren't needed to fix the bug.

Yes, they were needed: that variable was no longer used after the
change.  Removal of unused code is the same as changing commentary or
whitespace: it is generally done when the related code changes.

> This sort of thing is quite common, and there's nothing wrong with it.

Indeed, there's nothing wrong with the changes you are trying to
represent as examples.  Your changes were different in kind, and that
is what this discussion is about.

> >> [retitling from "Changes in update-game-score.c"]
> > [Why?]
> 
> Others requested retitling and this seemed reasonable.

Others were wrong, there's no reason to retitle.  The discussion is
still about changes in update-game-score.



  reply	other threads:[~2014-01-25  7:22 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 [this message]
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
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

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

  git send-email \
    --in-reply-to=83fvoccyqt.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=eggert@cs.ucla.edu \
    --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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.