Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > alt.os.linux > #80267

Re: patch a file with the patch command

From "J.O. Aho" <user@example.net>
Newsgroups alt.os.linux
Subject Re: patch a file with the patch command
Date 2024-08-06 08:06 +0200
Message-ID <lhdsqiF30ivU1@mid.individual.net> (permalink)
References <v8pvb6$iff4$1@dont-email.me> <lhbom2FnhvqU1@mid.individual.net> <v8qrch$qt2t$1@dont-email.me> <lhct4kFt2soU1@mid.individual.net> <v8scub$1d5gg$1@dont-email.me>

Show all headers | View raw


On 06/08/2024 07.39, alex wrote:
> Il 05/08/24 23:05, J.O. Aho ha scritto:
>>
>> it's to remove the first level of directory as in my example the paths 
>> had been
> 
> ├── orig
> │   └── file.txt
> └── revised
>      └── file.txt
> 
> $ cat orig/file.txt
> buggated
> 
> $ cat revised/file.txt
> fixed
> 
> $ diff -ur orig/ revised/ > file.patch
> 
> ├── file.patch (FILE CREATED)
> ├── orig
> │   └── file.txt
> └── revised
>      └── file.txt
> 
> $ cd orig/
> 
> $ patch < ../file.patch
> patching file file.txt
> 
> $ cd ..
> 
> $ cat orig/file.txt
> fixed
> 
> To notice
> 
> $ patch < ../file.patch
> 
> Even if it was not used -p1 it worked equally.
> 
> Why?

I guess for you have the original path setup, I tend to prefer to use 
the -p option no matter what.

-- 
  //Aho

Back to alt.os.linux | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

patch a file with the patch command alex <1j9448a02@lnx159sneakemail.com.invalid> - 2024-08-05 09:35 +0200
  Re: patch a file with the patch command "J.O. Aho" <user@example.net> - 2024-08-05 12:43 +0200
    Re: patch a file with the patch command alex <1j9448a02@lnx159sneakemail.com.invalid> - 2024-08-05 17:33 +0200
      Re: patch a file with the patch command "J.O. Aho" <user@example.net> - 2024-08-05 23:05 +0200
        Re: patch a file with the patch command alex <1j9448a02@lnx159sneakemail.com.invalid> - 2024-08-06 07:39 +0200
          Re: patch a file with the patch command "J.O. Aho" <user@example.net> - 2024-08-06 08:06 +0200
        Re: patch a file with the patch command alex <1j9448a02@lnx159sneakemail.com.invalid> - 2024-08-06 07:36 +0200

csiph-web