From: Junio C Hamano Date: Tue, 06 Oct 2026 12:44:19 GMT Subject: Re: [PATCH 1/2] stash create: remove duplicate changes detection Message-ID: In-Reply-To: <1617d92942d283017272ca6f27f1254f8f9389b0.1791218125.git.phillip.wood@dunelm.org.uk> Phillip Wood writes: > From: Phillip Wood > > Before it creates a stash, git checks if there are any unstaged, > or uncommitted changes. If there isn't anything to stash it bails > out. Since ef0f0b4509 (stash: optimize `get_untracked_files()` > and `check_changes()`, 2019-02-25) "git stash store" has checked "store"? Aren't we talking about "create"? > unreliable (the scripted version of "git stash store", called "git > update-index -q --refresh" before looking for any changes). Ditto. > Avoid checking for changes twice by removing the call to > check_changes_tracked_files() from store_stash() and restore the return > code handling in store_stash() that was removed by ef0f0b4509 so that > we continue to exit 0 when there are no changes to stash. In principle > we could remove the call to check_changes() from do_store_stash() > instead, but then we'd need to pass in the list of untracked files. Again "(do_)?store" -> "\1create"?