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

Make new command take branch names #72

Closed
chshersh opened this issue Jul 4, 2019 · 3 comments · Fixed by #99
Closed

Make new command take branch names #72

chshersh opened this issue Jul 4, 2019 · 3 comments · Fixed by #99
Assignees
Labels
CLI command-line interface question Further information is requested

Comments

@chshersh
Copy link
Contributor

chshersh commented Jul 4, 2019

Sometimes when I create a new branch, it's not attached to some issue. For example, I want to fix docs, but I don't want to create an issue for that. Because hit works with issue numbers, it's not possible to create branches not under some issue.

I propose to make hit new command a little bit smarter. It will parse argument, and if it's a number then it should keep current behavior. But if it's arbitrary text, it will create branch from this text prefixing with user name.

$ hit new fix-docs
> git checkout -b chshersh/fix-docs
@chshersh chshersh added question Further information is requested CLI command-line interface labels Jul 4, 2019
@vrom911
Copy link
Member

vrom911 commented Jul 8, 2019

I'm voting for this. I caught myself on this issue as well, I think it could be helpful.
I had another idea as the solution to this but I think your one is better. I thought about creating both: issue on GitHub and the branch with the returned number of the issue as we usually do. But, again, I agree that your solution is more reasonable 👍

@chshersh
Copy link
Contributor Author

chshersh commented Jul 8, 2019

@vrom911 Thanks for your support! I think your solution also reasonable. And can be implemented as a separate flag, like hit new -i "Bump up to GHC-8.6.5". Probably you don't want to create an issue by default, but I can see how this can be useful. Probably this flag makes hit new-issue command redundant?

@vrom911
Copy link
Member

vrom911 commented Jul 8, 2019

Hmm, I like the option more (fewer words/commands to remember), so we can discuss this under that issue and leave this one only for branch creation. Thanks for clarifications and links, @chshersh !

@vrom911 vrom911 changed the title [RFC] More flexible hit new command Make new command take branch names Jul 30, 2019
@vrom911 vrom911 self-assigned this Jul 30, 2019
vrom911 added a commit that referenced this issue Jul 30, 2019
vrom911 added a commit that referenced this issue Jul 30, 2019
chshersh pushed a commit that referenced this issue Jul 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLI command-line interface question Further information is requested
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants