提交 f24f666b 编写于 作者: J Jingwen Owen Ou

Move head fetching to command executation

上级 73848d89
......@@ -36,16 +36,16 @@ of title you can paste a full URL to an issue on GitHub.
var flagPullRequestBase, flagPullRequestHead string
func init() {
head, _ := FetchGitHead()
cmdPullRequest.Flag.StringVar(&flagPullRequestBase, "b", "master", "BASE")
cmdPullRequest.Flag.StringVar(&flagPullRequestHead, "h", head, "HEAD")
cmdPullRequest.Flag.StringVar(&flagPullRequestHead, "h", "", "HEAD")
}
func pullRequest(cmd *Command, args []string) {
repo := NewRepo()
repo.Base = flagPullRequestBase
repo.Head = flagPullRequestHead
if flagPullRequestHead != "" {
repo.Head = flagPullRequestHead
}
messageFile := filepath.Join(repo.Dir, "PULLREQ_EDITMSG")
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册