Re: [PATCH] stash: Add --include-untracked option to stash and remove all untracked files
- From
Matthieu Moy <matthieu.moy@grenoble-inp.fr>
- Date
- Jun 24, 2011, 20:31 UTC
- Message-ID
- <vpqei2jj7jl.fsf@bauges.imag.fr>
- In-Reply-To
- <1308945726-20910-1-git-send-email-david@porkrind.org>
David Caldwell <david@porkrind.org> writes:
> The --include-untracked option acts like the normal "git stash save" but > also adds all untracked files in the working directory to the stash and then > calls "git clean --force --quiet"
Great you did it, that's indeed something I missed with git stash.
> + (test -z "$untracked" || test -z $(untracked_files))
Shouldn't there be double quotes around $(untracked_files)?
Show 6 quoted lines
> + -u|--include-untracked) > + untracked=untracked > + ;; > + -a|--all) > + untracked=all > + ;;
I first thought of --all as a complement of --include-untracked, but in your proposal, a simple
git stash --all
is accepted. If you go this way, maybe there should be more symetry in option naming. For example, --all could be --include-ignored.
Or you can consider that --all is short and sweet, and go for it ;-).
-- Matthieu Moy http://www-verimag.imag.fr/~moy/