Re: [PATCH v2 3/4] introduce new format for git stash create
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jan 30, 2017, 21:10 UTC
- Message-ID
- <xmqqbmuouudg.fsf@gitster.mtv.corp.google.com>
- In-Reply-To
- <20170129201604.30445-4-t.gummerer@gmail.com>
Thomas Gummerer <t.gummerer@gmail.com> writes:
Show 13 quoted lines
> 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?