built-in add -p: implement the "stash" and "reset" patch modes