Re: Git stash create with untracked files?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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: signature.asc
Description: PGP signature


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux