Re: [PATCH] apply: when -R, also reverse list of sections

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jonathan Tan <jonathantanmy@xxxxxxxxxx> writes:

> A patch changing a symlink into a file is written with 2 sections (in
> the code, represented as "struct patch"): firstly, the deletion of the
> symlink, and secondly, the creation of the file. When applying that
> patch with -R, the sections are reversed, so we get:
>
>  (1) creation of a symlink, then
>  (2) deletion of a file.

Good observation.

But I have to wonder if it breaks the support for (arguably outside
the Git usecase) input that has more than one patch that touches the
same path to blindly reverse the order of all patches (instead of
the obvious implementation of the fix for the above stated problem
--- i.e. make sure the first patch is a deletion of a symlink and
what immediately follows is a creation of a regular file, and swap
them only in such a case).



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux