[debhelper-devel] [debhelper] 02/05: dh_clean: Skip over .git, .svn, .bzr, .hg, and CVS directories and avoid cleaning their contents. Closes: #760033
Joey Hess
joey at kitenet.net
Fri Oct 3 19:25:54 UTC 2014
This is an automated email from the git hooks/post-receive script.
joeyh pushed a commit to branch master
in repository debhelper.
commit 14b2527835f75935fc47ab5c6f723269a5f57286
Author: Joey Hess <joey at kitenet.net>
Date: Fri Oct 3 15:14:32 2014 -0400
dh_clean: Skip over .git, .svn, .bzr, .hg, and CVS directories and avoid cleaning their contents. Closes: #760033
I don't much like debhelper needing to contain yet another copy of every
bit of vcs cruft known to man; at least this only needs to be the
directories and not other dotfiles.
---
debian/changelog | 7 +++++++
dh_clean | 7 ++++++-
2 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/debian/changelog b/debian/changelog
index d1d37fc..5c32f2f 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+debhelper (9.20140818) UNRELEASED; urgency=medium
+
+ * dh_clean: Skip over .git, .svn, .bzr, .hg, and CVS directories
+ and avoid cleaning their contents. Closes: #760033
+
+ -- Joey Hess <joeyh at debian.org> Fri, 03 Oct 2014 15:13:08 -0400
+
debhelper (9.20140817) unstable; urgency=medium
* Added Portuguese translation of the man pages, by Américo Monteiro.
diff --git a/dh_clean b/dh_clean
index 931dd21..85f87f2 100755
--- a/dh_clean
+++ b/dh_clean
@@ -122,8 +122,13 @@ if (! $dh{D_FLAG}) {
$find_options="! \\( $dh{EXCLUDE_FIND} \\) -a";
}
+ # vcs directories that should not have their contents cleaned
+ my $vcs_dirs=join " -o ", map { "-path .\\*/" . $_ }
+ (".git", ".svn", ".bzr", ".hg", "CVS");
+
# Remove other temp files.
- complex_doit("find . $find_options \\( \\( -type f -a \\
+ complex_doit("find . $find_options \\( \\( \\
+ \\( $vcs_dirs \\) -prune -o -type f -a \\
\\( -name '#*#' -o -name '.*~' -o -name '*~' -o -name DEADJOE \\
-o -name '*.orig' -o -name '*.rej' -o -name '*.bak' \\
-o -name '.*.orig' -o -name .*.rej -o -name '.SUMS' \\
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debhelper/debhelper.git
More information about the debhelper-devel
mailing list