Re: [PATCH] rebase [-i --exec | -ix] <CMD>...

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

 




Junio C Hamano <gitster@xxxxxxxxx> a écrit :


+		if orig_head=$(git rev-parse -q --verify "$2") ||
+		   test `expr substr "$2" 1 1` = -
+		then
+			echo "You must specify a command after --exec option\n"
+			usage
+		else
+			if test -n "$cmd"
+			then
+				cmd="$2,$cmd"
+			else
+				cmd="$2"
+			fi
+		fi
+		shift
+		;;

Are you telling me that I cannot have a branch named "make"?  Drop
this nonsense, and just write it in a more straightforward way, e.g.

	-x)
		test 2 -le "$#" || usage
                cmd="${cmd:+"$cmd$LF"} $2"
                shift
                ;;
I agree with the fact that the code must not restrain you in naming branches.
But shouldn't we keep the "test `expr substr "$2" 1 1` = -" part so that
options can't be right after the "--exec" ?


--
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]