[GH-ISSUE #44] git-sim rebase not working #33

Closed
opened 2026-03-02 16:47:20 +03:00 by kerem · 2 comments
Owner

Originally created by @TheKnarf on GitHub (Jan 30, 2023).
Original GitHub issue: https://github.com/initialcommit-com/git-sim/issues/44

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

Originally created by @TheKnarf on GitHub (Jan 30, 2023). Original GitHub issue: https://github.com/initialcommit-com/git-sim/issues/44 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](https://user-images.githubusercontent.com/213777/215473113-84b67263-1716-4cb3-81af-5fe2f4581074.jpg)
kerem 2026-03-02 16:47:20 +03:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@initialcommit-io commented on GitHub (Jan 30, 2023):

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.

<!-- gh-comment-id:1408954524 --> @initialcommit-io commented on GitHub (Jan 30, 2023): 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.
Author
Owner

@initialcommit-io commented on GitHub (Feb 5, 2023):

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

<!-- gh-comment-id:1418243230 --> @initialcommit-io commented on GitHub (Feb 5, 2023): @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.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/git-sim#33
No description provided.