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

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

 



Thomas Gummerer <t.gummerer@xxxxxxxxx> 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?



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