Update logic for last commit