Re: [PATCH 2/2] diff: add a special SYMLINK user-diff driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2010/9/21 Jeff King <peff@xxxxxxxx>:
> +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 }'

?
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]