You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by ja...@apache.org on 2019/12/18 07:49:18 UTC
[couchdb] branch master updated: Warn about orphan .git directories
This is an automated email from the ASF dual-hosted git repository.
jaydoane pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/couchdb.git
The following commit(s) were added to refs/heads/master by this push:
new c5d24d8 Warn about orphan .git directories
new 26221fa Merge pull request #2359 from cloudant/git-dir-warning
c5d24d8 is described below
commit c5d24d8417503ff81a0670d41524799b4ed38e5e
Author: Jay Doane <ja...@apache.org>
AuthorDate: Tue Dec 17 23:05:43 2019 -0800
Warn about orphan .git directories
A .git directory found in src/ usually indicates that the code in the
enclosing directory is managed from said .git directory. This can lead
to confusion, and developers opening PRs against obsolete repos when, as
happens frequently, a formerly separate repository becomes integrated
into the primary repo.
This patch changes the configure script to warn when it finds such .git
directories.
Example output:
$ ./configure --dev --skip-deps
==> configuring couchdb in rel/couchdb.config
WARNING unexpected .git directory src/couch_tests/.git
WARNING unexpected .git directory src/rexi/.git
WARNING unexpected .git directory src/mem3/.git
WARNING unexpected .git directory src/smoosh/.git
WARNING unexpected .git directory src/couch_mrview/.git
WARNING unexpected .git directory src/couch/.git
WARNING unexpected .git directory src/couch_replicator/.git
WARNING unexpected .git directory src/ddoc_cache/.git
WARNING unexpected .git directory src/couch_peruser/.git
WARNING unexpected .git directory src/setup/.git
WARNING unexpected .git directory src/couch_log/.git
WARNING unexpected .git directory src/couch_epi/.git
WARNING unexpected .git directory src/mango/.git
WARNING unexpected .git directory src/chttpd/.git
WARNING unexpected .git directory src/couch_stats/.git
WARNING unexpected .git directory src/global_changes/.git
WARNING unexpected .git directory src/couch_event/.git
WARNING unexpected .git directory src/fabric/.git
WARNING unexpected .git directory src/couch_plugins/.git
WARNING unexpected .git directory src/ken/.git
WARNING unexpected .git directory src/couch_index/.git
You have configured Apache CouchDB, time to relax. Relax.
---
configure | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/configure b/configure
index bcd7619..defe145 100755
--- a/configure
+++ b/configure
@@ -237,4 +237,12 @@ if [ -d .git -a $SKIP_DEPS -ne 1 ]; then
${REBAR} get-deps update-deps
fi
+# External repos frequently become integrated with the primary repo,
+# resulting in obsolete .git directories, and possible confusion.
+# It is usually a good idea to delete these .git directories.
+for path in $(find src -name .git -type d); do
+ git ls-files --error-unmatch $(dirname $path) > /dev/null 2>&1 && \
+ echo "WARNING unexpected .git directory $path"
+done
+
echo "You have configured Apache CouchDB, time to relax. Relax."