Skip to content
This repository was 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

@Zahrun

Description

@Zahrun

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

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingtriagePriority not decided yet

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions