Oddbean new post about | logout
 Do you often need to check if a patch was merged to #Linux #kernel and which version is showed up in?

Or check through which tree a particular patch was merged?

I have to do this and a few other things all the time, hence I developed a script to make these tasks a little easier for me: 

#linuxscru, the #LinuxKernel scrutiny tool – https://gitlab.com/knurd42/kernel-scripts/-/blob/master/linuxscru/linuxscru?ref_type=heads

Right now it's tailored for my needs and my setup; but that could change if other people show an interest in it.

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

https://cdn.fosstodon.org/media_attachments/files/111/186/331/916/244/340/original/cc5093ea7abe84fa.png 
 @c6fcef92 
why did I read it as linux SRCU (Sleepable RCU) ;)
it's nice tool though! 
 @c6fcef92 Cool, here's a horrible hack of a "implement a database in a filesystem tree" that I use for the stable development work I do for this same problem (and others like it): https://git.sr.ht/~gregkh/linux-stable_commit_tree 
 @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''