RE: [PATCH v9] Support auto-merge for meld to follow the vim-diff behavior

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

 



Hi Junio,

> You cannot interpret an empty output from "git config section.variable"; it could be "[section] variable" (which is true), or it could be a sign that there is no "[section] variable = value" in the configuration (which you treat as false)

Yes, I notice that both "[section] variable " and "[section] variable = " output empty string but have reverse Boolean value.

> Catching common spellings of 'true' and 'false' in the output of the string version of "git config", while checking for 'auto' at the same time, may not be too bad as an optimization to save an extra call to "git config --bool 2>/dev/null" (and ignoring errors)...

With preview point, ` git config --bool ...` would better than "not be too bad"  : )

With the return code and return string from ` git config --bool ...`, 
follow pseudo-code maybe good for current situation.
if meld_use_auto_merge_option =` git config --bool ...`
then
	# success, maybe "(empty)"/true/false
	if test -z "$ meld_use_auto_merge_option"
	then
		meld_use_auto_merge_option=false
	fi
else
	# failed, the option is not empty or Boolean
	if test "auto" = ` git config `
	then
		# detect the "--auto-merge" option
	else
		meld_use_auto_merge_option=false
	fi
fi

Changes will upload with the [PATCH v12].
I'll update to you when the patch is ready. 

Regards
Lin





[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