question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Push to gerrit is pushing to branch instead of refs/for/<branch>

See original GitHub issue

We have a strange behavior here, the plugin pushed a commit as a normal push instead of as a review.

Situation:

editing a review that depends on 2 other reviews those reviews target a branch other than master committing and choosing “commit and push” in the push dialogs:

  1. the 3 review are visible,
  2. push to gerrit check box is pre-checked (didn’t touch this box)
  3. the destination branch is preset to features/xyz from a previous push to gerrit which i don’t change and is correct
  4. hashtags are preset and not changed I click on “push” and all 3 review are now marked as submitted in gerrit

In the version control logs on intellij i find:

 create mode 100644 view/src/main/angular/tsconfig.app.json
 create mode 100644 view/src/main/angular/tsconfig.json
 create mode 100644 view/src/main/angular/tsconfig.spec.json
17:24:14.361: [management-console] git -c credential.helper= -c core.quotepath=false -c log.showSignature=false push --progress --porcelain origin refs/heads/review/david_delbecq/1852:features/data-pricing-console
Enumerating objects: 146, done.
Delta compression using up to 8 threads
Total 144 (delta 33), reused 79 (delta 24)
remote: 
remote: Processing changes: refs: 1, closed: 1 (\)
remote: Processing changes: refs: 1, closed: 1 (|)
remote: Processing changes: refs: 1, closed: 1 (/)
remote: Processing changes: refs: 1, closed: 1 (-)
remote: Processing changes: refs: 1, closed: 1 (\)
remote: Processing changes: refs: 1, closed: 1 (\)
remote: Processing changes: refs: 1, closed: 1 (\)
remote: Processing changes: refs: 1, closed: 1, done            
To ssh://git.obfuscated/project/name
 	refs/heads/review/david_delbecq/1852:refs/heads/features/xyz	cbc2cd9..2ae6c59

This behavior never happened before and happened twice this week. This might be related to the fact it’s the first time we do both branch targeting, hashtags and chained reviews on the same review.

It looks like the checkbox “submit to gerrit” was prechecked by intellij in both occurences, but the model didn’t match this value. Most of the time it’s not prechecked and we have to manually check it.

intellij version: 2019.2.3 community edition gerrit plugin version: 1.2.2-146 gerrit version: 3.0.1

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
benno-mueller-saxesscommented, Mar 18, 2022

@uwolfer The issue is fixed by IntelliJ in Version 2021.3.3

0reactions
uwolfercommented, Jan 14, 2022

@benno-mueller-saxess: The referenced issue should be available in the next release of IntelliJ - please report back if that resolves your issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why is git push gerrit HEAD:refs/for/master used instead of git ...
This pushes your changes to the staging area (in the diagram, "Pending Changes"). Gerrit doesn't actually have a branch called <BRANCH> ; it ......
Read more >
Uploading Changes - Gerrit Code Review
Gerrit restricts direct pushes that bypass review to: refs/heads/* : any branch can be updated, created, deleted, or rewritten by the pusher.
Read more >
Pushing a Commit - Gerrit Code Review
Pushing the commit. From a terminal window, type the following command: git push origin HEAD:refs/for/[BRANCH_NAME].
Read more >
Disable pushing to Git with refs/for/master for CDT - Bugs
First page of the push wizard (39.70 KB, image/png) ... /bin/sh > # reject push to Gerrit magic refs "refs/for/<branch name>" which is...
Read more >
Gerrit Code Review - Access Controls
Magic references. These are references with added functionality to them compared to a regular git push operation. refs/for/<branch ref>.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found