diff options
author | Jay Doane <jaydoane@apache.org> | 2019-12-17 23:05:43 -0800 |
---|---|---|
committer | Jay Doane <jaydoane@apache.org> | 2019-12-17 23:05:43 -0800 |
commit | c5d24d8417503ff81a0670d41524799b4ed38e5e (patch) | |
tree | 680dce808bd23f6b139a655982b39f6fa85af05b | |
parent | 98c474598cef1e90b0892e53be1ce324959a13f8 (diff) | |
download | couchdb-c5d24d8417503ff81a0670d41524799b4ed38e5e.tar.gz |
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.
-rwxr-xr-x | configure | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -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." |