mirror of
https://gitea.com/gitea/tea.git
synced 2025-09-04 02:48:29 +02:00
don't push before creating a pull (#334)
Not sure if this is the best way, but it's the simplest way to fix #333. Everything else is overly complex due to a chicken-egg problem: Knowing which remote / branch to push involves requires prompting the user, which requires to have a upstream branch pushed to detect default values. Co-authored-by: Norwin Roosen <git@nroo.de> Reviewed-on: https://gitea.com/gitea/tea/pulls/334 Reviewed-by: 6543 <6543@obermui.de> Reviewed-by: Andrew Thornton <art27@cantab.net> Reviewed-by: khmarbaise <khmarbaise@noreply.gitea.io> Co-authored-by: Norwin <noerw@noreply.gitea.io> Co-committed-by: Norwin <noerw@noreply.gitea.io>
This commit is contained in:
@ -223,5 +223,5 @@ func (r TeaRepo) TeaGetCurrentBranchName() (string, error) {
|
||||
return "", fmt.Errorf("active ref is no branch")
|
||||
}
|
||||
|
||||
return strings.TrimPrefix(localHead.Name().String(), "refs/heads/"), nil
|
||||
return localHead.Name().Short(), nil
|
||||
}
|
||||
|
Reference in New Issue
Block a user