I have some buggy third-party script, which generates some files, I want to put into git. Now, the script does work mostly fine but at times fails and deletes files (I know this is horrible, ...).
Now, I would like to detect, when a file removal is added to the index and filter that out. The only solution that I could come up with would be to do git diff
and search for deleted file mode
and backstep to the path. This does seem pretty ugly, though.
Is there a better way of filtering this?