Skip to content

It immediately crashes #82

@johnfn

Description

@johnfn

This is literally the first thing I did after I installed it.

 % stack-pr view
Exitcode: 128
Stdout: None
Stderr: fatal: Not a valid object name origin/main

Traceback (most recent call last):
  File "/Users/grantmathews/.local/bin/stack-pr", line 8, in <module>
    sys.exit(main())
             ~~~~^^
  File "/Users/grantmathews/.local/pipx/venvs/stack-pr/lib/python3.13/site-packages/stack_pr/cli.py", line 1403, in main
    common_args = deduce_base(common_args)
  File "/Users/grantmathews/.local/pipx/venvs/stack-pr/lib/python3.13/site-packages/stack_pr/cli.py", line 851, in deduce_base
    deduced_base = get_command_output(
        ["git", "merge-base", args.head, f"{args.remote}/{args.target}"]
    )
  File "/Users/grantmathews/.local/pipx/venvs/stack-pr/lib/python3.13/site-packages/stack_pr/shell_commands.py", line 59, in get_command_output
    proc = run_shell_command(cmd, capture_output=True, quiet=False, **kwargs)
  File "/Users/grantmathews/.local/pipx/venvs/stack-pr/lib/python3.13/site-packages/stack_pr/shell_commands.py", line 40, in run_shell_command
    return subprocess.run(list(map(str, cmd)), **kwargs)
           ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/[email protected]/3.13.2/Frameworks/Python.framework/Versions/3.13/lib/python3.13/subprocess.py", line 579, in run
    raise CalledProcessError(retcode, process.args,
                             output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['git', 'merge-base', 'HEAD', 'origin/main']' returned non-zero exit status 128.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions