Re: [PATCH v4] git-am: add option to extract email Message-Id: tag into commit log

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

 




On 07/02/2014 06:03 PM, Torsten Bögershausen wrote:
@@ -565,6 +568,7 @@ Use \"git am --abort\" to remove it.")"
  	echo " $git_apply_opt" >"$dotest/apply-opt"
  	echo "$threeway" >"$dotest/threeway"
  	echo "$sign" >"$dotest/sign"
+	echo "$message_id" >"$dotest/message-id"
  	echo "$utf8" >"$dotest/utf8"
  	echo "$keep" >"$dotest/keep"
  	echo "$scissors" >"$dotest/scissors"
@@ -651,6 +655,10 @@ then
  else
  	SIGNOFF=
  fi
+if test "$(cat "$dotest/message-id")" = t
Does the usage of '"' inside of '"' look good, or can we write like this:
if test $(cat "$dotest/message-id") = t

With your change, it will fail if the file is missing or empty.

Complex shell scripts cannot be made to look good. If that's a requirement then the script should be rewritten in a reasonable language.
--
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]