Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow cloning of repositories at specific commits #23

Open
ltalirz opened this issue Nov 8, 2020 · 4 comments
Open

Allow cloning of repositories at specific commits #23

ltalirz opened this issue Nov 8, 2020 · 4 comments

Comments

@ltalirz
Copy link

ltalirz commented Nov 8, 2020

Some git repositories don't use tags (for example all of heroku's getting started apps), i.e. in order to do reproducible clones you would like to be able to point to a specific commit via its SHA1 hash.

@crisward
Copy link
Owner

crisward commented Nov 8, 2020

This plugin works by cloning the repo into a temp directory, then pushing it to dokku. So shouldn't be a big deal to update this to allow a hash, however not sure the best syntax for that as the third parameter is already being used for tags & branches. If this isn't a common issue, you could fork the repo you wanted at that commit, and use that.

Or if you want to suggest a nifty commit syntax I'd consider a pull request.

@ltalirz
Copy link
Author

ltalirz commented Nov 8, 2020

What about the approach taken by the ansible git module (see the documentation of the version and refspec parameters):
https://docs.ansible.com/ansible/latest/collections/ansible/builtin/git_module.html

In essence, the version parameter can be used for branches, tags and sha1 hashes alike.

The refspec parameter is needed only when specifying sha1 hashes that are not reachable by any branch or tag, which is not a use case I have ever encountered. In my view it is fine not to support it until a use case arises.

@ltalirz
Copy link
Author

ltalirz commented Jan 24, 2021

What about the approach taken by the ansible git module (see the documentation of the version and refspec parameters):
https://docs.ansible.com/ansible/latest/collections/ansible/builtin/git_module.html

In essence, the version parameter can be used for branches, tags and sha1 hashes alike.

This also seems to be the approach taken by @josegonzalez in the new git:sync feature of dokku 0.23 dokku/dokku#4297

Does this new feature basically replace the dokku-clone plugin?

@josegonzalez
Copy link
Contributor

@ltalirz that was the idea.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants