Am Fr., 24. Jan. 2025 um 13:15 Uhr schrieb Greg KH <[email protected]>: > On Fri, Jan 24, 2025 at 10:51:03AM +0100, Andreas Grünbacher wrote: > > Am Fr., 24. Jan. 2025 um 09:54 Uhr schrieb Greg KH <[email protected]>: > > > On Fri, Jan 24, 2025 at 09:37:46AM +0100, Petr Tesarik via Quilt-dev > > > wrote: > > > > Hi all, > > > > > > > > following a recent SUSE-internal discussion about differences between > > > > patches produced by Git and patches produced by GNU diff, I wonder if > > > > we could allow git-diff as an alternative backend in quilt. > > > > > > > > FWIW I am willing to send in patches, but I want to make sure they > > > > would be appreciated before I invest my time. > > > > I assume you mean "git diff" as well as "git apply". Supporting those > > would certainly help; it would probably give quilt full binary diff > > support "for free". But that won't be easy to achieve: quilt relies on > > GNU patch to create backup files when applying patches, and it's those > > backup files that "quilt diff" and similar commands operate against. > > I don't know about 'git apply' as I don't want that, if I did I would > use (and do use) 'git am' for when applying patches that are a quilt > series. > > I think 'patch' can apply 'git diff' generated patches, but it's the > diff itself that was the problem. Try it with changing a mode of a > file, I don't think diff can handle that but patch can? I think that's > the problem I run into at times with importing git patches into quilt. > > Petr, what was your reason for wanting to use 'git diff'? > > > In addition, the last time I checked, "git apply" had weird heuristics > > built in instead of accepting a specific strip level; see GNU patch's > > -p / --strip option. Quilt remembers the strip levels of patches and > > preserves strip levels 0 and 1 when refreshing patches. > > > > > I know I would like this as I had a long-standing bug somewhere in the > > > stable queues that was tripped up by using gnu diff instead of git-diff. > > > > > > I think the issue had to do with permission settings of files which > > > git-diff handled and GNU diff didn't? Maybe, I can't quite recall it at > > > the moment but can dig it up if needed. > > > > > > I remember trying to override the GNU diff usage in quilt, but couldn't > > > figure out how to get it to work, so yes, I would like this feature if > > > possible. > > > > Was that before GNU patch had basic git diff support? GNU patch and > > diff still don't do binary patches. > > Let me dig up the thread... > > No, all I cared about was mode settings, here's the kernel thread about > this: > > https://lore.kernel.org/r/CAHk-=wiZ9vaM23eW2k4R-ovtcWLyL8PWvnCG=ryey4xxgz6...@mail.gmail.com > > And here is the TODO for diffutils to add this support that patch > already has: > > https://lore.kernel.org/r/[email protected] > don't know if it ever got added or not.
Oh, I see. It shouldn't be difficult to make quilt use 'git diff --no-index' for generating diffs. The diffs would all be -p1 style and you'd lose the timestamps of GNU diff, but those are often undesirable, anyway. Probably as an additional 'quilt diff' and 'quilt refresh' option? Thanks, Andreas _______________________________________________ Quilt-dev mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/quilt-dev
