patch doesn't chmod rej files

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

patch doesn't chmod rej files

Han Boetes
Hi,

The first rej file created by patch is always mode 600 and
concurrent rejfiles are always mode 644.

First two identical examplefiles and patch that will fail:

~/.tmp/testje% cat test
dit is de eerste regel
dit Is regel twee
en dit is de laatste regel

~/.tmp/testje% cat test1
dit is de eerste regel
dit Is regel twee
en dit is de laatste regel

~/.tmp/testje% cat diffje
--- test.orig   Wed Nov 16 19:56:42 2005
+++ test        Wed Nov 16 19:57:04 2005
@@ -1,3 +1,4 @@
 dit is de eerste regel
-dit is regel twee
+dit is Regel twee
 en dit is de laatste regel
+en nu nog een regel erbij
--- test1.orig  Wed Nov 16 19:56:42 2005
+++ test1       Wed Nov 16 19:57:04 2005
@@ -1,3 +1,4 @@
 dit is de eerste regel
-dit is regel twee
+dit is Regel twee
 en dit is de laatste regel
+en nu nog een regel erbij

~/.tmp/testje% patch < diffje
... it fails and creates rej files ...

~/.tmp/testje% ls -lA
-rw-r--r-- 1 han users 414 Nov 16 20:03 diffje
-rw-r--r-- 1 han users  68 Nov 16 20:41 test
-rw-r--r-- 1 han users  68 Nov 16 20:34 test.orig
-rw------- 1 han users 133 Nov 16 20:41 test.rej
-rw-r--r-- 1 han users  68 Nov 16 20:41 test1
-rw-r--r-- 1 han users  68 Nov 16 20:40 test1.orig
-rw-r--r-- 1 han users 133 Nov 16 20:41 test1.rej

I don't think it's really important, but I wanted to report it
anyway.



# Han

Reply | Threaded
Open this post in threaded view
|

Re: patch doesn't chmod rej files

Otto Moerbeek
On Wed, 16 Nov 2005, Han Boetes wrote:

> Hi,
>
> The first rej file created by patch is always mode 600 and
> concurrent rejfiles are always mode 644.

Yeah, I know patch does some strange things with temp files. never
noted this one, though. It's on my list.

        -Otto

>
> First two identical examplefiles and patch that will fail:
>
> ~/.tmp/testje% cat test
> dit is de eerste regel
> dit Is regel twee
> en dit is de laatste regel
>
> ~/.tmp/testje% cat test1
> dit is de eerste regel
> dit Is regel twee
> en dit is de laatste regel
>
> ~/.tmp/testje% cat diffje
> --- test.orig   Wed Nov 16 19:56:42 2005
> +++ test        Wed Nov 16 19:57:04 2005
> @@ -1,3 +1,4 @@
>  dit is de eerste regel
> -dit is regel twee
> +dit is Regel twee
>  en dit is de laatste regel
> +en nu nog een regel erbij
> --- test1.orig  Wed Nov 16 19:56:42 2005
> +++ test1       Wed Nov 16 19:57:04 2005
> @@ -1,3 +1,4 @@
>  dit is de eerste regel
> -dit is regel twee
> +dit is Regel twee
>  en dit is de laatste regel
> +en nu nog een regel erbij
>
> ~/.tmp/testje% patch < diffje
> ... it fails and creates rej files ...
>
> ~/.tmp/testje% ls -lA
> -rw-r--r-- 1 han users 414 Nov 16 20:03 diffje
> -rw-r--r-- 1 han users  68 Nov 16 20:41 test
> -rw-r--r-- 1 han users  68 Nov 16 20:34 test.orig
> -rw------- 1 han users 133 Nov 16 20:41 test.rej
> -rw-r--r-- 1 han users  68 Nov 16 20:41 test1
> -rw-r--r-- 1 han users  68 Nov 16 20:40 test1.orig
> -rw-r--r-- 1 han users 133 Nov 16 20:41 test1.rej
>
> I don't think it's really important, but I wanted to report it
> anyway.
>
>
>
> # Han