kworkflow / patch-hub

patch-hub is a TUI that streamlines the interaction of Linux developers with patches archived on lore.kernel.org
GNU General Public License v2.0
8 stars 6 forks source link

Basic `git am` support #91

Open OJarrisonn opened 3 weeks ago

OJarrisonn commented 3 weeks ago

This is still a draft for this feature. The purpose of this is to implement just the backbone for the patch apply feature for patch-hub

What Is This?

This PR introduces an apply feature for patch-hub that let's kernel developers select a given patchset and apply it on a given kernel tree.

How it Works?

Currently open the details of a patchset and then press a. This will run git am in the background and try to apply the selected patchset to the selected kernel tree.

At the moment, you need to manually set some configurations in the config.json file in order to use this feature. The configs are:

Applying a patchset is done in a couple of steps:

What's next

@davidbtadokoro this PR works but there is no intuitive UI/UX for it so needs more polishing before being merged

@rodrigosiqueira any more hints about what a kernel developer might want when applying a patchset is welcome

OJarrisonn commented 3 weeks ago

All comments resolved

davidbtadokoro commented 2 weeks ago

Hey @OJarrisonn , I was thinking about revisiting the old implementation of patch-hub in Bash to see how I handled the setup of the repo before applying (checkout to the branch, guaranteed that the working directory is clean, etc.). If there is something we can leverage, I will bring it for us to merge this more robustly.

Of course, as we talked in the past days, the full notification about success and what else will become viable once we implement the pop-up system, but this sanitizing setup and teardown are worth for this PR.

In any case, be right back 🤝

OJarrisonn commented 2 weeks ago

I think it might be worthy to add a step to stash any changes just after cding into the tree and unstashing before cding back