Thread (1 message) 1 message, 1 author, 2017-01-30

Re: [PATCH v2 3/4] introduce new format for git stash create

From: Junio C Hamano <hidden>
Date: 2017-01-30 21:10:38

Thomas Gummerer [off-list ref] writes:
 create_stash () {
-	stash_msg="$1"
-	untracked="$2"
+	stash_msg=
+	untracked=
+	new_style=
...
+	while test $# != 0
+	do
+		case "$1" in
+		-m|--message)
+			shift
+			stash_msg="$1"
	${1?"-m needs an argument"}

to error check "git stash create -m<Enter>"?
+	if test -z "$new_style"
+	then
+		stash_msg="$*"
+	fi
This breaks external users who do "git stash create" in the old
fashioned way, I think, but can be easily fixed with something like:

		stash_msg=$1 untracked=$2

If the existing tests did not catch this, I guess there is a
coverage gap we may want to fill.  Perhaps add a new test to 3903
that runs "git stash create message untracked" and makes sure it
still works?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help