Am I missing something or it it just not possible to get a git clone using drush dl?

I would like do execute something like:
drush dl views-3.x-git

Which would not download the packaged dev release but get the 7.x-3.x branch from the views git repo.
This is particularly useful for projects that have no releases yet, such as

If not already implemented in some way, might this be a nice feature? Or would it complicate the dl code too mush?


jonhattan’s picture

Status: Active » Fixed

That's quite basic... drush dl views --package-handler=git_drupalorg

Drush dl only download git tags/branches related to releases. You can see available releases with drush rl.

Note that remote_import has no 7.x version so you need to explicitly ask for 6.x: drush rl remote_import-6.x.

As there's only a tag/release, it's enough to drush dl remote_import-6.x or drush dl remote_import-6.x --package-handler=git_drupalorg for a git clone.

helmo’s picture

Darn there went my example, in the meantime the module maintainer created a dev release. That's why drush dl remote_import-6.x --package-handler=git_drupalorg now works.

As of three days ago it didn't have any release. So I got the error "No release history was found for the requested project"

Thanks anyway.

jonhattan’s picture

So the answer is no. Drush can't download/clone a project if it has no releases. This may change across #1375270: Drush Make should use Drush core's native download abilities for git clones

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

Elijah Lynn’s picture

I just did a dr dl livereload ---package-handler=git_drupalorg and it downloaded the latest stable version. Was it supposed to download the latest from HEAD?

helmo’s picture

@Elijah Lynn: Commenting on a closed issue is not the best way to get someone's attention. But to answer your question, yes it is supposed to download the latest stable version.