Thanks Mara for looking into this.
IMHO, for 'discard chunk' would also make sense to add a confirmation step, and/or saving a backup version somewhere. While less code is lost irretrievably here (compared to a full revert), pressing the button is way too easy; it is right next to 'stage chunk', and it also can 'jump under the mouse' due to a delayed reaction to some previous action. (This latter happened to me, good thing I still remembered and could redo the needed changes.)
Also, here as well, git will not help much as discard chunk would discard changes done on top of the latest HEAD, which changes would normally not be available in the repository.