git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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/
Previous: David CaldwellNext: David Caldwell
Message 13 of 15 in “stash: Add --clean option to stash and remove all untracked files”
  1. stash: Add --clean option to stash and remove all untracked filesDavid Caldwell, Jun 20, 2011
  2. Jeff KingJun 21, 2011
  3. David CaldwellJun 21, 2011
  4. Andrew WongJun 21, 2011
  5. Johannes SixtJun 21, 2011
  6. Jeff KingJun 21, 2011
  7. Paul EbermannJun 21, 2011
  8. Marc BranchaudJun 21, 2011
  9. Miles BaderJun 22, 2011
  10. Jeff KingJun 22, 2011
  11. Junio C HamanoJun 21, 2011
  12. stash: Add --include-untracked option to stash and remove all untracked filesDavid Caldwell, Jun 24, 2011
  13. Matthieu MoyJun 24, 2011
  14. stash: Add --include-untracked option to stash and remove all untracked filesDavid Caldwell, Jun 25, 2011
  15. Junio C HamanoJun 26, 2011

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.