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

Re: [FR] Allow `git stash create` to include untracked changes

From
Junio C Hamano <gitster@pobox.com>
Date
Oct 28, 2019, 01:51 UTC
Message-ID
<xmqqa79lbpte.fsf@gitster-ct.c.googlers.com>
In-Reply-To
<d02ddc0db596771820b0cfdfae5b1504@kipras.org>
dev@kipras.org writes:
> Would it be possible for `git stash create` to include untracked
> changes (probably the same way `git stash push --include-untracked`
> does)?
Doesn't the subcommand have -u/--include-untracked option?
... goes and looks git-stash.sh ...
create_stash () {
	prepare_fallback_ident
	stash_msg=
	untracked=
	while test $# != 0
	do
		case "$1" in
		-m|--message)
			...
			;;
		-u|--include-untracked)
			shift
			untracked=${1?"BUG: create_stash () -u requires an argument"}
			;;
		...
	done
	...

It is entirely possible that with recent push to rewrite scripted Porcelain commands to builtin/, we may have lost a feature or two by accident.

  ... goes and checks ...

And it does appear that builtin/stash.c::create_stash() lacks support for command line arguments since d4788af8 ("stash: convert create to builtin", 2019-02-25).

Would doing
	export GIT_TEST_STASH_USE_BUILTIN=no
or
	git config --global stash.usebuiltin no
help in the meantime???
Previous: dev@kipras.orgNext: Kipras Melnikovas
Message 2 of 5 in “[FR] Allow `git stash create` to include untracked changes”
  1. dev@kipras.orgOct 26, 2019
  2. Junio C HamanoOct 28, 2019
  3. Kipras MelnikovasOct 28, 2019
  4. Johannes SchindelinOct 29, 2019
  5. Thomas GummererOct 31, 2019

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.