function _drush_generate_validate_repo_location

8.0.x _drush_generate_validate_repo_location($repo_root)
6.x _drush_generate_validate_repo_location($repo_root)
7.x _drush_generate_validate_repo_location($repo_root)
5.x _drush_generate_validate_repo_location($repo_root)
master _drush_generate_validate_repo_location($repo_root)

If the user has checked in the Drupal root, or the 'sites/all/modules' folder into a git repository, then we do not want to confuse that location with a "project".

1 call to _drush_generate_validate_repo_location()
_drush_generate_custom_project in commands/make/
Create a project record for an extension not downloaded from


commands/make/, line 247
Functions for the generate makefile command.


function _drush_generate_validate_repo_location($repo_root) {
  $project_name = basename($repo_root);
  // The Drupal root, or any folder immediately inside the Drupal
  // root cannot be a project location.
  if ((strlen(DRUPAL_ROOT) >= strlen($repo_root)) || (dirname($repo_root) == DRUPAL_ROOT)) {
    return NULL;
  // Also exclude sites/* and sites/*/{modules,themes} and profile/* and
  // profile/*/{modules,themes}.
  return $project_name;