git-sim
git-sim copied to clipboard
`git-sim rebase` not working
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.

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.
@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.