From: Ævar Arnfjörð Bjarmason Date: Wed, 22 Sep 2010 00:12:30 GMT Subject: Re: [PATCH 2/2] diff: add a special SYMLINK user-diff driver Message-ID: In-Reply-To: <20100921211303.GB1188@sigill.intra.peff.net> 2010/9/21 Jeff King : > +However, it may happen that you do want to change the diff parameters > +specifically for symlinks. You can do that by configuring the special > +"SYMLINK" diff driver. For example, to add a newline to the end of > +the symlink contents (and suppress the usual "no newline at end of file" > +warning), you could configure: > + > +----------------------------- > +[diff "SYMLINK"] > +       textconv = perl -pe 's/$/\n/' > +----------------------------- That'll turn every \n in the stream into \n\n, not add a newline to the end of the file. Don't you mean: perl -0666 -pe 's/$/\n/' Or, more efficiently: perl -ple 'END { print }' ?