Re: [PATCH v2] mergetool--lib: add new merge tool TortoiseMerge

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On Apr 5, 2009, at 12:00 AM, David Aguilar wrote:

diff --git a/git-mergetool--lib.sh b/git-mergetool--lib.sh
index dcd4516..268485a 100644
--- a/git-mergetool--lib.sh
+++ b/git-mergetool--lib.sh
@@ -46,10 +46,13 @@ check_unchanged () {

valid_tool () {
	case "$1" in
- kdiff3 | kompare | tkdiff | xxdiff | meld | opendiff | emerge | vimdiff | gvimdiff | ecmerge | diffuse) + kdiff3 | kompare | tkdiff | xxdiff | meld | opendiff | emerge | vimdiff | gvimdiff | ecmerge | diffuse | tortoisemerge)
		if test "$1" = "kompare" && ! diff_mode; then
			return 1
		fi
+		if test "$1" = "tortoisemerge" && ! merge_mode; then
+			return 1
+		fi
		;; # happy
	*)
		if test -z "$(get_merge_tool_cmd "$1")"; then

Why is `case "$1"` being followed by two `if test "$1" =`s?
Wouldn't it be simpler to have separate case arms for them?
Especially with how long that list is getting...

~~ Brian
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux