4 ms·
One thing I really hope they keep from Hub is the way it creates pull requests, namely by opening $EDITOR and using the first line as the PR title and the rest
by ekimekim 7y ago
One thing I really hope they keep from Hub is the way it creates pull requests, namely by opening $EDITOR and using the first line as the PR title and the rest as description, ie. exactly the same mechansim as git uses for "git commit".
Needing to navigate a menu to set title and description as it seems to show in the screenshots seems like completely unnessecary friction.
- RandallBrown 7y agoI would be surprised if it didn't work that way. That's the way PRs work on their website too.
- earenndil 7y ago> first line as the PR title and the rest as description > exactly the same mechanism as git uses for "git commit" That's not how git commit works. git commit opens $EDITOR and makes a list of lines (sans commented-out lines) from that. The first line being a title is only convention, whereas in a github PR it's a formal element of the system.
- wtallis 7y agoIt's a bit more than just a convention, since `git log` has lots of formatting options that rely on that first line being the title/subject.
- CydeWeys 7y agoIt's not really just convention. Git commit messages map directly to emails for workflows that don't use web UIs like GitHub, with the first line being the subject and the rest being the email body. That's how you mail a commit to someone else for them to review it or incorporate it into their local repo. If you don't format your commit messages properly then they'll just be a sloppy mess in any email-based workflow (like what Linux uses). And the first line is the only line that's displayed in contexts like `git log`, so it truly is the commit summary even if you aren't emailing commits.
- solarkraft 7y agoThat's still just a convention :-) But you'll find that most of the things humans do are. Everything is a social construct.
- CydeWeys 7y agoIf you're going to define your words in such a way that what you're saying is meaningless, why bother even saying anything at all?
- geerlingguy 7y agoFor the title, it prompts, then for the description, it lets you either enter an editor of your choice. The thing I like most about it in a little use today, though, is when it goes to create the PR, it lets you choose to create it directly, or open a 'preview' of the PR in the browser. This is nice for creating Draft PRs which you're still working on and should not yet be merged (since, right now, there's no way to create a PR then put it back into 'Draft' state).
- lilyball 7y agoI stopped using hub to create PRs because it wouldn't fill in the issue template. I don't know if that's ever been fixed. Instead I used it to "compare" my changes, which opens the page in the browser with the "create pull request" button available where I go through the in-browser PR flow.
- ekimekim 7y agoIt definitely uses the issue template nowadays, if there is one. If there isn't, and the PR is one commit, it will reuse the commit message. If it's multiple commits, it'll give you a commented out list of every commit message, which I generally then give a title to and munge down into a description.