better publish script detection of dirty git