Optimize code

This commit improves 895686365cf8fa7bb09b2ba9f9cc44e55ff33955.

Signed-off-by: Sven Strickroth <email@cs-ware.de>
Do not show an error in patch dialog for uncommitted changed files

Signed-off-by: Sven Strickroth <email@cs-ware.de>
TortoiseGitMerge: Check valid regular expression in Regex Filter Dialog

Based on TortoiseSVN revision 25329

Signed-off-by: Sup Yut Sum <ch3cooli@gmail.com>