All of lore.kernel.org
 help / color / mirror / Atom feed
* Creating patches for source
@ 2005-05-27  1:21 Alejandro Bonilla
  2005-05-27  2:34 ` randy_dunlap
  0 siblings, 1 reply; 3+ messages in thread
From: Alejandro Bonilla @ 2005-05-27  1:21 UTC (permalink / raw)
  To: linux-kernel

Hi,

    Quick and fast question here. I'm starting to create patches (diff) 
:-) so, I googled for a while and most say that one could use the diff 
-up or diff -Naur. They both look to me very similar and honestly -up 
works for me. Still, what command will make the cleanest patch and which 
one is mostly used?

Thanks for the time,

.Alejandro

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Creating patches for source
  2005-05-27  2:34 ` randy_dunlap
@ 2005-05-27  1:48   ` Alejandro Bonilla
  0 siblings, 0 replies; 3+ messages in thread
From: Alejandro Bonilla @ 2005-05-27  1:48 UTC (permalink / raw)
  To: randy_dunlap; +Cc: linux-kernel

randy_dunlap wrote:

>On Thu, 26 May 2005 20:21:43 -0500 Alejandro Bonilla wrote:
>
>| Hi,
>| 
>|     Quick and fast question here. I'm starting to create patches (diff) 
>| :-) so, I googled for a while and most say that one could use the diff 
>| -up or diff -Naur. They both look to me very similar and honestly -up 
>| works for me. Still, what command will make the cleanest patch and which 
>| one is mostly used?
>
>You looked at 'man diff', right?
>  
>
Yes.

>and linux/Documentation/SubmittingPatches, which says:
>Use "diff -up" or "diff -uprN" to create patches.
>  
>
well, the "or" doesn't tells me the that there is a best way. That's the 
deal.

>So you use the options that are appropriate for your patches.
>
>If you are patching only one file (or a few files in the same
>directory), -up is usually fine.
>  
>
Excelent.

>If you have patches in multiple directories and you want diff
>to search in subdirectories for patches, you need to use -r
>(recursive).
>If you are adding new files, you need to use -N.
>  
>
Adding new files into the whole source? Like it will  make a patch with 
the full content and then create the file when patching the source? 
Thanks for that one, sounds like I will need to use it.

>Is there a specific problem that you are trying to solve?
>  
>
I was just patching a README :-) and the patch looked too big and/or 
bulky, so I noticed it was using a lot of lines from the document, but I 
was only changing a single letter in a word. i.e. I changed/added 20 
letters in total, and the patch is like 200 words.

I think it's just me being a paranoid patch-newbie.

Thanks,

.Alejandro

>---
>~Randy
>
>  
>


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Creating patches for source
  2005-05-27  1:21 Creating patches for source Alejandro Bonilla
@ 2005-05-27  2:34 ` randy_dunlap
  2005-05-27  1:48   ` Alejandro Bonilla
  0 siblings, 1 reply; 3+ messages in thread
From: randy_dunlap @ 2005-05-27  2:34 UTC (permalink / raw)
  To: Alejandro Bonilla; +Cc: linux-kernel

On Thu, 26 May 2005 20:21:43 -0500 Alejandro Bonilla wrote:

| Hi,
| 
|     Quick and fast question here. I'm starting to create patches (diff) 
| :-) so, I googled for a while and most say that one could use the diff 
| -up or diff -Naur. They both look to me very similar and honestly -up 
| works for me. Still, what command will make the cleanest patch and which 
| one is mostly used?

You looked at 'man diff', right?

and linux/Documentation/SubmittingPatches, which says:
Use "diff -up" or "diff -uprN" to create patches.

So you use the options that are appropriate for your patches.

If you are patching only one file (or a few files in the same
directory), -up is usually fine.
If you have patches in multiple directories and you want diff
to search in subdirectories for patches, you need to use -r
(recursive).
If you are adding new files, you need to use -N.

Is there a specific problem that you are trying to solve?

---
~Randy

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2005-05-27  2:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-05-27  1:21 Creating patches for source Alejandro Bonilla
2005-05-27  2:34 ` randy_dunlap
2005-05-27  1:48   ` Alejandro Bonilla

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.