git-sim icon indicating copy to clipboard operation
git-sim copied to clipboard

`git-sim rebase` not working

Open TheKnarf opened this issue 2 years ago • 1 comments
trafficstars

This didn't work at all:

git-sim rebase main
Simulating: git rebase main
Traceback (most recent call last):
  File "/usr/local/bin/git-sim", line 8, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.10/site-packages/git_sim/__main__.py", line 261, in main
    scene.render()
  File "/usr/local/lib/python3.10/site-packages/manim/scene/scene.py", line 223, in render
    self.construct()
  File "/usr/local/lib/python3.10/site-packages/git_sim/git_sim.py", line 56, in construct
    self.command.execute()
  File "/usr/local/lib/python3.10/site-packages/git_sim/git_sim_rebase.py", line 73, in execute
    if self.scene.args.branch[0] in self.repo.git.branch("--contains", commit):
  File "/usr/local/lib/python3.10/site-packages/git/cmd.py", line 741, in <lambda>
    return lambda *args, **kwargs: self._call_process(name, *args, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/git/cmd.py", line 1315, in _call_process
    return self.execute(call, **exec_kwargs)
  File "/usr/local/lib/python3.10/site-packages/git/cmd.py", line 1109, in execute
    raise GitCommandError(redacted_command, status, stderr_value, stdout_value)
git.exc.GitCommandError: Cmd('git') failed due to: exit code(129)
  cmdline: git branch --contains dark
  stderr: 'error: malformed object name dark'

I created a local test repo to create some illustrations, but couldn't even get the basic example to work. I got two branches in my repo called *feature/1 and main.

git-sim status did work. git-sim-status_01-30-23_13-08-52

TheKnarf avatar Jan 30 '23 12:01 TheKnarf

Hi again @TheKnarf ,

Thanks for reporting - I'll look into this today. FYI I can tell this is related to repos with less than 5 commits on a branch, which the program handles as a special case to make sure the diagrams take up the right amount of space.

Rebases involving branches with more than 5 commits shouldn't be affected by this.

initialcommit-io avatar Jan 30 '23 16:01 initialcommit-io

@TheKnarf Sry for the delay. I pushed a fix to this a few days ago but forgot to update this ticket. To update to the most recent version of git-sim use:

$ pip install git-sim --upgrade

Closing for now since this should be fixed, but please re-open if any issues.

initialcommit-io avatar Feb 05 '23 19:02 initialcommit-io