use diff-index to detect changes before stashing