quilt-dev
[Top][All Lists]
Advanced

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

Re: [Quilt-dev] What about git-diff as an alternative diff backend?


From: Greg KH
Subject: Re: [Quilt-dev] What about git-diff as an alternative diff backend?
Date: Fri, 24 Jan 2025 13:14:54 +0100

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 <greg@kroah.com>:
> > 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=RyeY4XXgZ6BCg@mail.gmail.com

And here is the TODO for diffutils to add this support that patch
already has:
        
https://lore.kernel.org/r/03dac14b-ed62-3e2b-878f-b145383ea9f8@cs.ucla.edu
don't know if it ever got added or not.

thanks,

greg k-h



reply via email to

[Prev in Thread] Current Thread [Next in Thread]