Oddbean new post about | logout
 @c6fcef92 Let's debug by this horrible interface!  

$ ./linuxscru history Makefile

Traceback (most recent call last):
  File "/mnt/fast_t2/linux/gregkh/./linuxscru", line 526, in <module>
    cmdargs.func(cmdargs)
  File "/mnt/fast_t2/linux/gregkh/./linuxscru", line 376, in cmd_history
    if not GITTREE.is_file(cmdargs.patterns):
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/mnt/fast_t2/linux/gregkh/./linuxscru", line 251, in is_file
    if GITTREE.gitpyrepo.git.rev_list('-1', GITTREE.remotes['mainline'][0], '--', pattern):
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/git/cmd.py", line 739, in <lambda>
    return lambda *args, **kwargs: self._call_process(name, *args, **kwargs)
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/git/cmd.py", line 1315, in _call_process
    return self.execute(call, **exec_kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/git/cmd.py", line 1110, in execute
    raise GitCommandError(redacted_command, status, stderr_value, stdout_value)
git.exc.GitCommandError: Cmd('git') failed due to: exit code(128)
  cmdline: git rev-list -1 mainline/master -- Makefile
  stderr: 'fatal: bad revision 'mainline/master'' 
 @ba73f167 

Guess your remotes have different names:

https://gitlab.com/knurd42/kernel-scripts/-/blob/master/linuxscru/linuxscru?ref_type=heads#L52

See the README as well.

https://gitlab.com/knurd42/kernel-scripts/-/blob/master/linuxscru/README.md?ref_type=heads

Side note: needs a tree that contains mainline, next and stable, not sure if that's the case for you.

Guess I should fix these things up and include a few checks, but I first wanted to see if anyone is interested in this…