<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
<title>Comments on snippet: 'Git whitespace fixes for windows newlines'</title>
<link>http://snipplr.com</link>
<description>Snipplr comments feed'</description>
<language>en-us</language>
<pubDate>Sun, 26 May 2013 02:37:39 GMT</pubDate>
<item>
<title>Mikelifeguard said on 2/17/10</title>
<link>http://snipplr.com/view/8399/git-whitespace-fixes-for-windows-newlines/</link>
<description><![CDATA[ Sorry, again! One of my seds has a typo too! This time I've actually copy-pasted from my pre-commit hook instead of typing it out. Note that `$c` is already found further up in the script. This is $against in my broken example above, and is in the .sample script already - I just shortened it.

    for f in `exec git diff-index --cached --check $c -- | sed '/^[-+]/d' | sed -r 's:[0-9]+:.*//' | uniq` ; do
        sed -i 's/[[:space:]]*$//' $f
    done ]]></description>
<pubDate>Wed, 17 Feb 2010 23:32:45 GMT</pubDate>
<guid>http://snipplr.com/view/8399/git-whitespace-fixes-for-windows-newlines/</guid>
</item>
<item>
<title>Mikelifeguard said on 2/17/10</title>
<link>http://snipplr.com/view/8399/git-whitespace-fixes-for-windows-newlines/</link>
<description><![CDATA[ HAH, remove that `--ignore-space-at-eol` obviously. That's *exactly* what we're trying to find `:D` ]]></description>
<pubDate>Wed, 17 Feb 2010 23:19:20 GMT</pubDate>
<guid>http://snipplr.com/view/8399/git-whitespace-fixes-for-windows-newlines/</guid>
</item>
<item>
<title>Mikelifeguard said on 2/17/10</title>
<link>http://snipplr.com/view/8399/git-whitespace-fixes-for-windows-newlines/</link>
<description><![CDATA[ One of the seds seems to be wrong. Try:

    # Find files with trailing whitespace
    for FILE in `exec git diff-index --check --cached --ignore-space-at-eol $against -- | sed '/^[+-]/d' | sed -r 's/:[0-9]+:.*//' | uniq`; do
        # Fix them!
        sed -i 's/[[:space:]]+$//' $FILE
    done ]]></description>
<pubDate>Wed, 17 Feb 2010 23:14:46 GMT</pubDate>
<guid>http://snipplr.com/view/8399/git-whitespace-fixes-for-windows-newlines/</guid>
</item>
<item>
<title>benpjohnson said on 9/21/08</title>
<link>http://snipplr.com/view/8399/git-whitespace-fixes-for-windows-newlines/</link>
<description><![CDATA[ Doesn't really work for most issues had to disable it in the pre-commit hook file for time being ]]></description>
<pubDate>Sun, 21 Sep 2008 14:44:27 GMT</pubDate>
<guid>http://snipplr.com/view/8399/git-whitespace-fixes-for-windows-newlines/</guid>
</item>
</channel>
</rss>