Re: [PATCH v2] stash: infer "push" when push-specific options are given
Show 26 quoted lines
> > +test_expect_success 'assume push when options imply push' '
> > + git reset --hard &&
> > + echo changed >file &&
> > + git add file &&
> > + git stash -m "implied push" file &&
> > + git stash pop &&
> > +
> > + git add file &&
> > + git stash --staged file &&
> > + git stash pop &&
> > +
> > + git add file &&
> > + git stash --keep-index file &&
> > + git stash pop &&
> > +
> > + echo untracked >untracked-file &&
> > + git stash --include-untracked untracked-file &&
> > + test_path_is_missing untracked-file &&
> > + git stash pop &&
> > + rm -f untracked-file
> > +'
> > +
>
> This leaves 'file' in the staging area. Using "git reset --hard" like
> you did at the start is probably the easiest way to clean up.
>
Understood, will use "git reset --hard" here as well.
Show 10 quoted lines
> Apart from the testing, since the following is not true anymore...
>
> For quickly making a snapshot, you can omit "push". In this mode,
> non-option arguments are not allowed to prevent a misspelled
> subcommand from making an unwanted stash entry. The two exceptions to
> this are `stash -p` which acts as alias for `stash push -p` and
> pathspec elements, which are allowed after a double hyphen `--` for
> disambiguation.
>
> ...you should probably change the documentation for "git push" as well.
Yes, I will update the documentation as well and send a v3 shortly.