<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <title>Comments on snippet: 'Git whitespace fixes for windows newlines'</title>
    <description>Snipplr comments feed</description>
    <link>https://snipplr.com/</link>
    <lastBuildDate>Wed, 15 Apr 2026 01:29:50 +0000</lastBuildDate>
    <item>
      <title>benpjohnson said on 21/Sep/2008</title>
      <link>https://snipplr.com/view/8399/git-whitespace-fixes-for-windows-newlines</link>
      <description>&lt;p&gt;Doesn't really work for most issues had to disable it in the pre-commit hook file for time being&lt;/p&gt;</description>
      <pubDate>Sun, 21 Sep 2008 14:44:27 UTC</pubDate>
      <guid>https://snipplr.com/view/8399/git-whitespace-fixes-for-windows-newlines</guid>
    </item>
    <item>
      <title>Mikelifeguard said on 17/Feb/2010</title>
      <link>https://snipplr.com/view/8399/git-whitespace-fixes-for-windows-newlines</link>
      <description>&lt;p&gt;One of the seds seems to be wrong. Try:&#13;
&#13;
    # Find files with trailing whitespace&#13;
    for FILE in `exec git diff-index --check --cached --ignore-space-at-eol $against -- | sed '/^[+-]/d' | sed -r 's/:[0-9]+:.*//' | uniq`; do&#13;
        # Fix them!&#13;
        sed -i 's/[[:space:]]+$//' $FILE&#13;
    done&lt;/p&gt;</description>
      <pubDate>Wed, 17 Feb 2010 23:14:46 UTC</pubDate>
      <guid>https://snipplr.com/view/8399/git-whitespace-fixes-for-windows-newlines</guid>
    </item>
    <item>
      <title>Mikelifeguard said on 17/Feb/2010</title>
      <link>https://snipplr.com/view/8399/git-whitespace-fixes-for-windows-newlines</link>
      <description>&lt;p&gt;HAH, remove that `--ignore-space-at-eol` obviously. That's *exactly* what we're trying to find `:D`&lt;/p&gt;</description>
      <pubDate>Wed, 17 Feb 2010 23:19:20 UTC</pubDate>
      <guid>https://snipplr.com/view/8399/git-whitespace-fixes-for-windows-newlines</guid>
    </item>
    <item>
      <title>Mikelifeguard said on 17/Feb/2010</title>
      <link>https://snipplr.com/view/8399/git-whitespace-fixes-for-windows-newlines</link>
      <description>&lt;p&gt;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.&#13;
&#13;
    for f in `exec git diff-index --cached --check $c -- | sed '/^[-+]/d' | sed -r 's:[0-9]+:.*//' | uniq` ; do&#13;
        sed -i 's/[[:space:]]*$//' $f&#13;
    done&lt;/p&gt;</description>
      <pubDate>Wed, 17 Feb 2010 23:32:45 UTC</pubDate>
      <guid>https://snipplr.com/view/8399/git-whitespace-fixes-for-windows-newlines</guid>
    </item>
  </channel>
</rss>
