LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-29-2010, 03:10 AM   #1
ltoso
LQ Newbie
 
Registered: May 2010
Posts: 1

Rep: Reputation: 0
why use diff


Hi,
i want to know why do we need to patch files based upon diff when we can directly overwrite the old file with the new file.


Please recommend
regards
ltoso
 
Old 05-29-2010, 03:17 AM   #2
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,256

Rep: Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321
size.
Put yourself in the position of a kernel programmer. He fixes three of the thousands of files in one modules 17 directories down and adds a new subdir to that directory with a few files in it. If he didn't have diff, how would he distribute this work?
 
Old 05-29-2010, 03:41 AM   #3
grail
LQ Guru
 
Registered: Sep 2009
Location: Perth
Distribution: Manjaro
Posts: 10,005

Rep: Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191
Plus patching is quite often the precursor to the next release but until it comes out and fixes the relevant issues the patch is supplied.
 
Old 05-29-2010, 05:38 AM   #4
cantab
Member
 
Registered: Oct 2009
Location: England
Distribution: Kubuntu, Ubuntu, Debian, Proxmox.
Posts: 553

Rep: Reputation: 115Reputation: 115
Size, and also maybe to not clash with other changes.
 
Old 05-29-2010, 06:28 AM   #5
jamescondron
Member
 
Registered: Jul 2007
Location: Scunthorpe, UK
Distribution: Ubuntu 8.10; Gentoo; Debian Lenny
Posts: 961

Rep: Reputation: 70
Its also a brilliant way of looking at what this new code contains; a few times I've seen patches which are no better than the code they replace, and have been in a position to say so. If I was being sent a tarball of the whole thing then we'd probably have to keep running the new bad code until it broke and we fixed it again.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Using Diff metallica1973 Linux - General 17 12-06-2007 07:38 AM
What is the diff between / and // stardotstar Linux - Newbie 1 09-30-2004 01:02 AM
Dual Boot diff Hard Disk diff OS on Suse 9.1 wilhem Linux - Newbie 1 08-13-2004 06:06 PM
So, What's the diff.? The Manic Mouse Linux - Distributions 3 03-19-2004 07:38 AM
What a Diff! perry General 0 12-05-2003 07:10 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:17 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration