Skip to content

Upstream 16173 - add force flag to refspec#249

Merged
cigamit merged 1 commit intomainfrom
upstream16173
Feb 28, 2026
Merged

Upstream 16173 - add force flag to refspec#249
cigamit merged 1 commit intomainfrom
upstream16173

Conversation

@cigamit
Copy link
Copy Markdown
Contributor

@cigamit cigamit commented Feb 28, 2026

When creating a project with allow branch override and then trying to sync it after a rebase & force push, the project update fails with:

fatal: [localhost]: FAILED! => {"changed": false, "cmd": ["/usr/bin/git", "fetch", "--tags", "origin", "refs/heads/*:refs/remotes/origin/*"], "msg": "Failed to download remote objects and refs:  From https://github.com/pb82/ansible-tower-samples\\n ! [rejected]        master     -> origin/master  (non-fast-forward)\\n"}

Adding the force flag + fixes that.

@cigamit cigamit requested a review from TheWitness February 28, 2026 05:20
@cigamit cigamit self-assigned this Feb 28, 2026
Copilot AI review requested due to automatic review settings February 28, 2026 05:20
@cigamit cigamit added bug Something isn't working python Pull requests that update python code labels Feb 28, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR addresses project update failures after a repository rebase + force-push when the project is configured with branch override enabled, by forcing updates of remote-tracking refs during fetch.

Changes:

  • Update the default git refspec used when project.allow_override is enabled to a force refspec (+...) to allow non-fast-forward updates.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread awx/main/tasks/jobs.py
Comment thread awx/main/tasks/jobs.py
@cigamit cigamit merged commit c4f2586 into main Feb 28, 2026
4 checks passed
@cigamit cigamit deleted the upstream16173 branch February 28, 2026 16:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working python Pull requests that update python code

Development

Successfully merging this pull request may close these issues.

3 participants