Re: [RFC PATCH] Script for generating Documentation/dontdiff from .gitignore files.

Previous thread: [PATCH] rtc: fix kernel panic on second use of SIGIO nofitication by Marcin Slusarz on Sunday, September 14, 2008 - 11:11 am. (4 messages)

Next thread: XFS does not recognise mount options in 2.6.27-rc6 by Frederik Himpe on Sunday, September 14, 2008 - 11:53 am. (5 messages)
From: Eduard - Gabriel Munteanu
Date: Sunday, September 14, 2008 - 11:23 am

.gitignore files get more testing than Documentation/dontdiff, since most
developers follow Git workflow when sending patches. The latter tends to
stay outdated and needs to be synchronized every now and then. This patch
provides a script that scans all .gitignore files and generates a
Documentation/dontdiff to stdout.

Signed-off-by: Eduard - Gabriel Munteanu <eduard.munteanu@linux360.ro>
---
 scripts/gen_dontdiff.sh |   21 +++++++++++++++++++++
 1 files changed, 21 insertions(+), 0 deletions(-)
 create mode 100755 scripts/gen_dontdiff.sh

diff --git a/scripts/gen_dontdiff.sh b/scripts/gen_dontdiff.sh
new file mode 100755
index 0000000..cd94747
--- /dev/null
+++ b/scripts/gen_dontdiff.sh
@@ -0,0 +1,21 @@
+#!/bin/bash
+
+# Copyright (C) 2008 Eduard - Gabriel Munteanu
+#
+# This file is released under GPL version 2.
+
+echo "### Generated by gen_dontdiff.sh ###"
+
+grep -Ev "^([[:space:]]*[[#]]*|$)" .gitignore
+
+find . -mindepth 2 -name .gitignore | sed -e "s/^\.\///g" | while read FILE
+do
+	CURR_DIR=`echo "$FILE" | sed -e "s/\.gitignore$//g"`
+	echo "# $FILE"
+	grep -Ev "^([[:space:]]*[[#]]*|$)" $FILE | while read LINE
+	do
+		echo $CURR_DIR$LINE
+	done
+	echo ""
+done
+
-- 
1.5.6.1

--

From: Randy Dunlap
Date: Monday, September 15, 2008 - 8:34 am

Hi,
You probably missed (& should read) this thread:

---
~Randy
Linux Plumbers Conference, 17-19 September 2008, Portland, Oregon USA
http://linuxplumbersconf.org/
--


Thanks, it makes sense.

It seems like diff can't handle such scenarios at all. I suppose Linux should
supply its own diff tool (which uses regular diff, but implements proper file
matching).

Maybe git-diff alone could be included in the tarballs, I'll look into
it.


	Cheers,
--

Previous thread: [PATCH] rtc: fix kernel panic on second use of SIGIO nofitication by Marcin Slusarz on Sunday, September 14, 2008 - 11:11 am. (4 messages)

Next thread: XFS does not recognise mount options in 2.6.27-rc6 by Frederik Himpe on Sunday, September 14, 2008 - 11:53 am. (5 messages)