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

Pkg.submit suggestions #7820

Closed
ggggggggg opened this issue Aug 2, 2014 · 6 comments
Closed

Pkg.submit suggestions #7820

ggggggggg opened this issue Aug 2, 2014 · 6 comments
Labels
domain:packages Package management and loading status:help wanted Indicates that a maintainer wants help on an issue or pull request

Comments

@ggggggggg
Copy link
Contributor

First, Pkg.submit is pretty cool, I just used it to submit a pull request to HDF5.jl. It definitely easier to approach for the non-expert than figuring out how to fork and sync my changes with github myself. That said, it took me a few tries to realize that 1. I need to commit my changes (yes this is obvious, but hey I'm not that good at this) 2. what to do about it. The current behavior has you looking at an empty pull request when you haven't committed your changes locally.

My recommendation is for submit to look at the current branch, and it is in the default detached HEAD state, to print out some guidance like. Perhaps something like the following:

Before submitting a pull request you must commit your changes. Try "checkout -b newbranch" followed by "git add ." and "git commit -m "some useful commit message".

It would also be nice if it set up your branch such that git push pushes to the pull request branch that submit had created on github for easily updating that pull request.

@ivarne
Copy link
Sponsor Member

ivarne commented Aug 3, 2014

Maybe also look warn if there are uncommitted changes.

@ggggggggg
Copy link
Contributor Author

Here is a more complete sketch of what I think would be useful to git novices. I may have gotten the git best practices wrong. Also since Pkg.submit() already opens a page in your browser, maybe it makes sense to just open to a page on submitting to Julia packages for beginnings, then that page can be updated without altering Julia at all.

Pkg has noticed that your local git repository is not ready to create a pull request.

Best practice is to create a feature branch before you make any changes.

git checkout master
git checkout -b yourfeaturebranch

Then make your changes, including adding relevant test cases in to test/runtests.jl, and ensure the tests all pass. Then commit your changes before running Pkg.submit("PackageName") again.

git add .
git commit -m "useful commit message"

If you have already made changes, the workflow is slightly different.

git checkout -b yourfeaturebranch
git rebase -i origin/master
git add .
git commit -m "useful commit message"

If there are conflicts during the rebase fix them then git rebase --continue.

Once you have submitted your pull request, you may be asked to make further modifications before it is accepted. Pkg.submit() has configured your branch such that push XXX YYY will push any new commits on yourfeaturebranch to the pull request.

@StefanKarpinski
Copy link
Sponsor Member

These are good suggestions – thanks!

@toivoh
Copy link
Contributor

toivoh commented Aug 21, 2014

I can't seem to find any documentation for Pkg.submit, although the feature is listed in the news for Julia 0.3. Seems like a great feature if I dared to try it!

@kmsquire
Copy link
Member

See #6986.

@jakebolewski
Copy link
Member

Moved to PkgDev.jl

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
domain:packages Package management and loading status:help wanted Indicates that a maintainer wants help on an issue or pull request
Projects
None yet
Development

No branches or pull requests

7 participants