a-shell
a-shell copied to clipboard
Diff but no patch
Hi, @holzschu. I have just noticed that a-shell has a working diff
command, which is great, but no patch
command, which is not so great since the two usually go hand-in-hand. I am not sure if this is a reasonable request at this stage, but do you think it would be feasible to add it as well?
If you're in a git repo, try lg2 apply
to apply a patch.
Thanks. And if I'm not? :)
I'm working on a native implementation of patch (but I still have a few bugs to remove in the current version before I add new things).
There is also a Python version of patch, which could solve some of your issues: https://pypi.org/project/patch/
Thank you for the pointer!
The next version should have native patch (BSD version). Do you have sample files I could use for testing?
Hi, FYI, after a but of intensive testing with the native patch
, I'm going to stop working on it for now.
- the source of BSD patch that I could find has fewer features than Python patch
- it is very difficult to make it robust and re-entrant
- speed is not a critical feature for patch, robustness and re-entrance are.
I'm sorry it didn't work out.
Hi @holzschu, thank you for the effort! It is a pity that it is hard to make it work and that it looks like not paying off. However, I do understand that it is troublesome. I will try to use the Python patch as you suggested. Hopefully, it behaves the same way.