home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   alt.os.linux      Getting to be as bloated as Windows!      107,822 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 106,418 of 107,822   
   alex to All   
   Re: patch command not work   
   02 Sep 24 09:24:00   
   
   From: 1j9448a02@lnx159sneakemail.com.invalid   
      
   Il 31/08/24 15:09, alex ha scritto:   
   > ...   
      
   Maybe I understand.   
   File names must have the same length   
      
   $ echo text1 > abc   
      
   $ echo text2 > xyz   
      
   $ diff -u abc xyz > file.patch   
      
   $ patch --dry-run < file.patch   
   checking file abc   
      
   OK, but   
      
   $ mv abc abcc # 4 chars   
      
   $ diff -u abcc xyz > file.patch   
      
   $ patch --dry-run < file.patch   
   checking file xyz   
   Reversed (or previously applied) patch detected!  Assume -R? [n]   
   Apply anyway? [n]   
   Skipping patch.   
   1 out of 1 hunk ignored   
      
   Naturally I don't understand why this behavior.   
      
   In any case, the file with the tampered line, which works equally,   
   remains a mystery   
      
   $ mv abcc abc   
      
   $ diff -u abc xyz > file.patch   
      
   $ cat file.patch   
   --- abc	2024-09-02 08:47:52.764891184 +0200   
   +++ xyz	2024-09-02 08:47:52.764891184 +0200   
   @@ -1 +1 @@   
   -text1   
   +text2   
      
   Editing file.patch ...   
      
   $ cat file.patch   
   --- abc	2024-09-02 08:47:52.764891184 +0200   
   +++ TAMPERED LINE   
   @@ -1 +1 @@   
   -text1   
   +text2   
      
   $ patch --dry-run < file.patch   
   checking file abc   
      
   Bah...   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca