On stream#close don't commit to the repository unless we write something