Does cherry-pick *always* expects a clean working tree?
I know I can stash and do this, but I'm just wondering what cherry-pick actually expects.
I currently have two unstaged files. The commit that I want to cherry-pick will touch neither of these files, so I don't know why it complains "your local changes would be overwritten by cherry-pick".
If I do cherry-pick --no-commit then the change is cleanly applied, so I'm thinking why it can't just commit that instead of me having it write the commit in an additional step.
I think if there was nothing staged before the cherry-pick, and the files being overwritten by the cherry-pick are the same as in the cherry-picked commit's parent, then it should've worked. The state of the other unrelated files shouldn't matter.
Is this just git being extra cautious and not wanting to deal with any potential edgecases? I'm trying to understand what's the worst thing that can happen if I were to implement this in a script/alias.