about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--gerrit/client.go3
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,