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

Feature request : bump git commit #697

Closed
alanz opened this issue Jul 31, 2015 · 3 comments
Closed

Feature request : bump git commit #697

alanz opened this issue Jul 31, 2015 · 3 comments

Comments

@alanz
Copy link
Contributor

alanz commented Jul 31, 2015

At the moment, a specific commit has to be specified for a dependency, as in

packages:
- '.'
- location:
    git: git@github.com:alanz/ghc-mod
    commit: 526714aed7592c6d548ce38e9935bef0a984217b

I would like to be able to issue a command something like

stack bump ghc-mod wip

This would update the commit to reflect the currrent HEAD of the wip branch in the git@github.com:alanz/ghc-mod repository.

A possible enhancement would be to include a branch: wip field to the location, and then

stack bump

could update all the remote repositories.

@mboes
Copy link
Contributor

mboes commented Jul 31, 2015

The difficulty here is that it means that stack has to poke at and rewrite a file written by a human, retaining any formatting and all. The git repo support is meant for simple use cases, and it would be a shame to have it grow to ultimately reimplement entirely what git submodule already provides. If you make heavy use of external git repos, I would suggest using git submodule instead. It is equivalent to git: <repo> above and has much more functionality besides, in particular "bump" functionality as you request, in the form of

$ git submodule update --remote
$ git commit -a

@snoyberg
Copy link
Contributor

snoyberg commented Aug 5, 2015

I'm overall -1 on adding this functionality, though if someone sends a PR I'd probably accept it.

@snoyberg snoyberg added this to the Later improvements milestone Aug 5, 2015
@snoyberg
Copy link
Contributor

It doesn't look like this is something that's planned to be implemented, so closing.

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