Thomas Gummerer <[email protected]> writes:
> After the line
>
> test -n "$seen_non_option" || set "push" "$@"
>
> it's not possible that $# is 0 anymore, so this will never be
> printed. From a quick look at the history it seems like it wasn't
> possible to trigger that codepath for a while. If I'm reading things
> correctly 3c2eb80fe3 ("stash: simplify defaulting to "save" and reject
> unknown options", 2009-08-18) seems to have introduced the small
> change in behaviour.
Indeed. That wasn't on purpose, but I seem to have turned this
case $# in
0)
push_stash &&
say "$(gettext "(To restore them type \"git stash apply\")")"
;;
into dead code.
> As I don't think anyone has complained since then, I'd just leave it
> as is, which makes git stash with no options a little less verbose.
I agree it's OK to keep is as-is, but the original logic (give a bit
more advice when "stash push" was DWIM-ed) made sense too, so it can
make sense to re-activate it while porting to C.
--
Matthieu Moy
http://www-verimag.imag.fr/~moy/