Thread (2 messages) flat view 2 messages, 2 authors, 2016-06-15

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

From: <hidden>
Date: 2016-06-15 22:53:59

Junio C Hamano [off-list ref] a écrit :

quoted
+		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" ?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help