Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 4 Jun 2020 21:06:33 +0200
From:      Polytropon <freebsd@edvax.de>
To:        Per Hedeland <per@hedeland.org>
Cc:        Brandon helsley <brandon.helsley@hotmail.com>, freebsd-questions <freebsd-questions@freebsd.org>
Subject:   Re: Minimal skills
Message-ID:  <20200604210633.6965a714.freebsd@edvax.de>
In-Reply-To: <50fa37b5-42c4-e5ac-0b19-abfa996fcbad@hedeland.org>
References:  <CY4PR19MB0104DD86F8FE6446AD1BF327F9890@CY4PR19MB0104.namprd19.prod.outlook.com> <CY4PR19MB0104A2C03F4D66A1DA251A23F9880@CY4PR19MB0104.namprd19.prod.outlook.com> <20200604005859.ca438474.freebsd@edvax.de> <CY4PR19MB0104C290121BF756D57B2DDBF9880@CY4PR19MB0104.namprd19.prod.outlook.com> <20200604020051.0c02472d.freebsd@edvax.de> <CY4PR19MB0104DD86F8FE6446AD1BF327F9890@CY4PR19MB0104.namprd19.prod.outlook.com> <CY4PR19MB010470EB8E75DF42106CDD1AF9890@CY4PR19MB0104.namprd19.prod.outlook.com> <20200604082304.fe7d3d80.freebsd@edvax.de> <50fa37b5-42c4-e5ac-0b19-abfa996fcbad@hedeland.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 4 Jun 2020 13:43:58 +0200, Per Hedeland wrote:
> On 2020-06-04 08:23, Polytropon wrote:
> > On Wed, 3 Jun 2020 23:56:37 -0600, Brandon helsley wrote:
> >
> >> Could you tell me what this tool "diff" is.
> >
> > A diff (the tool, the process, and its result) means "difference".
> > For example, if you find a manpage where the explanation for a
> > certain option is missing, you take the original file, make a
> > working copy of it, change that working copy, and create a file
> > that contains the difference (i. e., the diff, also often
> > called the patch) between the original and the updated version.
> > This diff can then be sent to the FreeBSD team, and they will
> > apply it; the next issue of FreeBSD will then contain the
> > updated manpage instead of the original one.
> >
> > See "man diff" and "man patch" for details.
> >
> > Persons who have proven to be trusted contributors will get
> > direct access to the source code repository: they can check in
> > their changes by themselves.
> >
> > Here is a simplified outline of the process:
> >
> > 	# cd /usr/src/bin/ls
> > 	# cp ls.1 ls.1.orig
> > 	# vim ls.1
> > 		... you make your changes ...
> > 		:wq
> > 	# diff ls.1 ls.1.orig > ls.1.diff
> 
> Sorry to pick on this one error in the huge amounts of useful info
> that you provide, but this is *really* not the way to use diff, at
> least not if you expect anyone else to use the result. First, it
> produces a reverse diff, i.e. the changes needed to go from the new
> version of the file to the old one, which is at least
> annoying/confusing - and second, in combination with using the
> (unfortunately default) "normal" format, it becomes pretty much
> useless. These days, the proper way is
> 
>  	# diff -u ls.1.orig ls.1 > ls.1.diff

This is of course fully correct. My primary intention was to
provide an (over)simplified idea of how the diff + patch process
works. Thank you for providing a better explanantion, in addition
of pointing out _what_ to improve here. :-)




-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20200604210633.6965a714.freebsd>