summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorColin Walters <walters@verbum.org>2010-07-09 16:49:24 -0400
committerColin Walters <walters@verbum.org>2010-07-09 16:49:24 -0400
commitb054db49650d11783ef02e97f136ce0e0f0c8da1 (patch)
tree59f8c962fdda4e800af05a40ac2ae4b0c460d687
parent442f77df901d46e24abac33a76b99c1fb828638d (diff)
downloadhomegit-MOVED-TO-GNOME-b054db49650d11783ef02e97f136ce0e0f0c8da1.zip
homegit-MOVED-TO-GNOME-b054db49650d11783ef02e97f136ce0e0f0c8da1.tar.gz
homegit-MOVED-TO-GNOME-b054db49650d11783ef02e97f136ce0e0f0c8da1.tar.xz
Add comment and license
-rwxr-xr-xbin/git-un-diff-whitespace8
1 files changed, 8 insertions, 0 deletions
diff --git a/bin/git-un-diff-whitespace b/bin/git-un-diff-whitespace
index 6338a47..4e71f04 100755
--- a/bin/git-un-diff-whitespace
+++ b/bin/git-un-diff-whitespace
@@ -1,5 +1,13 @@
#!/usr/bin/python
+# Strip trailing whitespace ONLY in modified sections in the latest commit.
+# Usage:
+# <edit files>
+# $ git commit
+# $ git un-diff-whitespace
+# Copyright 2010 Colin Walters <walters@verbum.org>
+# Licensed under the new-BSD license (http://www.opensource.org/licenses/bsd-license.php)
+
import os,sys,re,subprocess
hunk_re = re.compile(r'^@@ -\d+,\d+ \+(\d+),(\d+) @@')