gitk: Avoid an error when cherry-picking if HEAD has moved on
gitk: Avoid an error when cherry-picking if HEAD has moved on

This fixes an error reported by Adam Piątyszek: if the current HEAD
is not in the graph that gitk knows about when we do a cherry-pick
using gitk, then gitk hits an error when trying to update its
internal representation of the topology.  This avoids the error by
not doing that update if the HEAD before the cherry-pick was a
commit that gitk doesn't know about.

Signed-off-by: Paul Mackerras <19a0ba370c443ba08d20b5061586430ab449ee8c@samba.org>

destenson/git,destenson/git,destenson/git,destenson/git,destenson/git,destenson/git,destenson/git,destenson/git