[Gllug] Building a patch

Nix nix at esperi.org.uk
Thu Dec 1 17:00:07 UTC 2005


On Thu, 1 Dec 2005, Adrian McMenamin announced authoritatively:
> I want to produce a patch in linux kernel style comparing two directories
> - one is alsa-lib-orig and the other is alsa-lib (alsa lib patched to
> allow it to build against uclibc as opposed to glibc). In addition I want
> the patch to ignore new files (ie the stuff generated by the ./configure).

diff -ur will do that, although it's a very strange requirement.

> patch -ur ./alsa-lib-orig ./alsa-lib just tells me which files are in one
> directory set and not the other

[s/patch/diff/ as you posted]

But this is what you wanted!

diff can ignore new files in the second tree via the --unidirectional-new-file
switch. This might be what you're looking for.

> 
> patch -Nur ./alsa-lib-orig ./alsa-lib seems to just gives me the content
> of the new files in the patch

Um, well, diffstat should show you that it gives you the differences
between all the others (if any), too.

(myself `diff -durN' is burned into my mind indelibly. :) )

-- 
`Y'know, London's nice at this time of year. If you like your cities
 freezing cold and full of surly gits.' --- David Damerell

-- 
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug




More information about the GLLUG mailing list