Thread (1 message) 1 message, 1 author, 2017-02-06

Re: [PATCH v3 5/5] stash: teach 'push' (and 'create') to honor pathspec

From: Jeff King <hidden>
Date: 2017-02-06 15:20:21

On Sun, Feb 05, 2017 at 11:09:14PM -0800, Junio C Hamano wrote:
quoted
@@ -99,6 +104,10 @@ create_stash () {
 	if test -z "$new_style"
 	then
 		stash_msg="$*"
+		while test $# != 0
+		do
+			shift
+		done
 	fi
The intent is correct, but I would probaly empty the "$@" not with
an iteration of shifts but with a single

	set x && shift

;-)
Perhaps it is not portable, but I think "set --" does the same thing and
is perhaps less obscure.

-Peff
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help