Skip to content
This repository has been archived by the owner on May 1, 2024. It is now read-only.

[Bug]: Shipping fails to push if remote branch already exists and is behind master #171

Open
Zahrun opened this issue Jun 11, 2023 · 0 comments
Assignees
Labels
bug Something isn't working triage Priority not decided yet

Comments

@Zahrun
Copy link
Contributor

Zahrun commented Jun 11, 2023

What happened?

pacup --ship ferdium-deb/ferdium-deb.pacscript
[...]

            :: Do you you want to delete the existing ship-ferdium-deb branch? [y/n] (y): 
            ✔ Successfully deleted ship-ferdium-deb branch
            ✔ Successfully checked out branch ship-ferdium-deb
            => Installing pacscript using pacstall

[...]

            => Shipping pacscript
            ✔ Successfully added ferdium-deb to git
            ✔ Successfully committed ferdium-deb
To github.com:Zahrun/pacstall-programs.git
 ! [rejected]          ship-ferdium-deb -> ship-ferdium-deb (non-fast-forward)
error: failed to push some refs to 'github.com:Zahrun/pacstall-programs.git'
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. Integrate the remote changes (e.g.
hint: 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮
│ in command:813                                                                                   │
│                                                                                                  │
│ in run:526                                                                                       │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
CalledProcessError: Command '['git', 'push', '--set-upstream', 'origin', 'ship-ferdium-deb']' returned 
non-zero exit status 1.

During handling of the above exception, another exception occurred:

╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮
│ in command:825                                                                                   │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
AttributeError: 'NoneType' object has no attribute 'decode'
[224578] Failed to execute script '__main__' due to unhandled exception!
[:~/UnixSync … acstall-programs/packages] ship-ferdium-deb+* 2m25s 1 ± git status
On branch ship-ferdium-deb
Untracked files:
  (use "git add <file>..." to include in what will be committed)
        td-git/
        tok-git/

nothing added to commit but untracked files present (use "git add" to track)

What do you expect to happen?

git push --set-upstream origin ship-ferdium-deb -f, we need to force push in that case

Which pacscripts are affected?

All

Steps to reproduce

See above

Version

Latest Release

Relevant log output

PacUp 2.0.0 Sirius
@Zahrun Zahrun added bug Something isn't working triage Priority not decided yet labels Jun 11, 2023
@Zahrun Zahrun changed the title [Bug]: Shipping fails to push if remote branch already exists [Bug]: Shipping fails to push if remote branch already exists and is behind master Jun 11, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working triage Priority not decided yet
Projects
None yet
Development

No branches or pull requests

2 participants