git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: "brian m. carlson" <sandals@crustytoothpaste.net>
To: Tao Klerks <tao@klerks.biz>
Cc: git <git@vger.kernel.org>
Subject: Re: Git stash create with untracked files?
Date: Wed, 27 Apr 2022 21:54:16 +0000	[thread overview]
Message-ID: <Ymm7iKKn/1I/YwOk@camp.crustytoothpaste.net> (raw)
In-Reply-To: <CAPMMpoj1pF=FfRg6Rgz6bP2mZaQhApL7QQx9=2U7i4AE4zsJ1w@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1206 bytes --]

On 2022-04-27 at 10:42:51, Tao Klerks wrote:
> Hi folks,
> 
> I'm just checking in case I'm missing something: Is there any way to
> tell "git stash create" to include untracked files?
> 
> Someone recently brought up a situation where they'd like to take a
> working directory state (incl untracked but not-ignored files), and
> reproduce it in another working directory on another machine; "git
> stash create" seems to be ideal for this purpose, save for the
> (apparent) lack of arguments support.

I don't think there's support for that right now, looking at the code.

> If this is not possible today and we wanted to better support this
> usecase, what would be a sensible way to do it? I can see three
> possible directions:
> 
> 1) Change the "create" subcommand to treat specific options as options
> rather than the stash message (and make it understand -u /
> --include-untracked)

This seems reasonable.  do_create_stash already takes several arguments
specifying what to include, so it's probably just a matter of parsing
options in create_stash and passing the proper arguments to
do_create_stash.
-- 
brian m. carlson (he/him or they/them)
Toronto, Ontario, CA

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 262 bytes --]

      reply	other threads:[~2022-04-27 21:55 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-27 10:42 Git stash create with untracked files? Tao Klerks
2022-04-27 21:54 ` brian m. carlson [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Ymm7iKKn/1I/YwOk@camp.crustytoothpaste.net \
    --to=sandals@crustytoothpaste.net \
    --cc=git@vger.kernel.org \
    --cc=tao@klerks.biz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).