Hi Dmitry, >> So if using ‘git apply --cached’ is the preferred solution, >> then I could finish the patch with it. > > I don't have a particularly strong opinion, but the approach with 'git > apply --cached' followed by 'git commit' seems easier to implement and > avoids changing the file contents on disk, or risking any of the > stashes. So I'd try implementing it first and then see if the remaining > problems are worth the trouble of doing it in a more difficult way. This is implemented now, and I'm already using it without problems. Please review this patch: