diff options
author | Florian Klink <flokli@flokli.de> | 2019-12-04T10·42+0100 |
---|---|---|
committer | Florian Klink <flokli@flokli.de> | 2019-12-04T10·43+0100 |
commit | 0175a10657b586cf704ea49661084ca4f06aa810 (patch) | |
tree | 76628fe93e0e9c8f5da18d4bf3dcc121082319b9 /gerrit/client.go | |
parent | 60a81b808c24f236ee603cbc310fae29bd2981e5 (diff) |
gerrit.client: update internal head after triggering a rebase
And we of course don't need to update HEAD if we just rebased a random changeset.
Diffstat (limited to 'gerrit/client.go')
-rw-r--r-- | gerrit/client.go | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/gerrit/client.go b/gerrit/client.go index ab114471dcf6..85a3eda815d1 100644 --- a/gerrit/client.go +++ b/gerrit/client.go @@ -141,17 +141,16 @@ func (c *Client) fetchChangeset(changeID string) (*Changeset, error) { } // SubmitChangeset submits a given changeset, and returns a changeset afterwards. -// TODO: update HEAD func (c *Client) SubmitChangeset(changeset *Changeset) (*Changeset, error) { changeInfo, _, err := c.client.Changes.SubmitChange(changeset.ChangeID, &goGerrit.SubmitInput{}) if err != nil { return nil, err } + c.head = changeInfo.CurrentRevision return c.fetchChangeset(changeInfo.ChangeID) } // RebaseChangeset rebases a given changeset on top of a given ref -// TODO: update HEAD func (c *Client) RebaseChangeset(changeset *Changeset, ref string) (*Changeset, error) { changeInfo, _, err := c.client.Changes.RebaseChange(changeset.ChangeID, &goGerrit.RebaseInput{ Base: ref, |