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

Path csiph.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From "J.O. Aho" <user@example.net>
Newsgroups alt.os.linux
Subject Re: patch a file with the patch command
Date Tue, 6 Aug 2024 08:06:10 +0200
Lines 48
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>
Mime-Version 1.0
Content-Type text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding 8bit
X-Trace individual.net wmff/ITvQLPHHmzb35RxfwGH9XqpD0ARY7qS3zAVMB8MLUP3Db
Cancel-Lock sha1:T5Sw6k3zEFcuoUeBAnpkfLmGWyo= sha256:d1DJF+F9WUd1Afds1/AU6J561/vp4eqfGUYLS5QyQdU=
User-Agent Mozilla Thunderbird
Content-Language en-US-large
In-Reply-To <v8scub$1d5gg$1@dont-email.me>
Xref csiph.com alt.os.linux:80267

Show key headers only | 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