Git development
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: 重田一聖 <kazumasa.shigeta@kanamei.com>
Cc: git@vger.kernel.org,  shabbir.r.bhojani@gmail.com,
	phillip.wood@dunelm.org.uk,  ps@pks.im
Subject: Re: [PATCH v2] stash: expose untracked modes in create
Date: Mon, 05 Oct 2026 09:43:03 -0700	[thread overview]
Message-ID: <xmqq1pa4ksiw.fsf@gitster.g> (raw)
In-Reply-To: <CANUHOw3gynMRGN7A-wOnL3PQtgFbMtsB2gyZxaq+0Z5bHp-H8A@mail.gmail.com> ("重田一聖"'s message of "Mon, 5 Oct 2026 01:55:18 -0400")

重田一聖 <kazumasa.shigeta@kanamei.com> writes:

> Your question made me realize that I had focused too narrowly on the
> untracked modes. The larger issue is not simply that `do_create_stash()`
> has capabilities that `git stash create` does not expose.

Brilliant.  I agree that is the right way to frame the issue.

> Making more of those capabilities available through `create` would
> therefore mean either changing that contract or designing around it.
> That is a much larger interface decision than I appreciated when I sent
> the patch.

Perhaps, but I do not think it is too huge a backward-compatibility
breakage to forbid giving a message lazily (i.e., all strings in
argv[] after 'git stash create' gets concatenated and becomes a
single message) that begins with "-", with an escape hatch that a
leading "-m" will take the next argv[] element as the message, for
example.

> 2. Add a new stash subcommand for the creation functionality.

This is essentially how 'git stash save' came about, to give us ways
to control how a new stash entry is created and how the working tree
is cleared with command line options.  In the beginning, you did not
even have to say 'save', because 'git stash <message>' was invented
as a way to say "the boss is here and tells me to work on something
unrelated. clear the slate with minimum number of keystrokes to
continue working on what I have been working on later."  And that
later became 'git stash push'.

> 3. Add something like `--create-only` to `git stash push`.

This also would work and sounds the safest.

  parent reply	other threads:[~2026-10-05 16:43 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-29  7:42 [PATCH] stash: expose untracked modes in create Kazumasa Shigeta
2026-09-29 16:08 ` Phillip Wood
2026-10-01 17:44   ` 重田一聖
2026-10-05 16:37     ` Phillip Wood
2026-10-01  4:21 ` [PATCH v2] " Kazumasa Shigeta
2026-10-01 11:32   ` Patrick Steinhardt
2026-10-01 16:01     ` 重田一聖
2026-10-01 16:36     ` Junio C Hamano
2026-10-01 17:03   ` Junio C Hamano
2026-10-02  1:53     ` 重田一聖
2026-10-02  9:04     ` 重田一聖
2026-10-05  5:55       ` 重田一聖
2026-10-05 16:38         ` Phillip Wood
2026-10-06  9:25           ` 重田一聖
2026-10-06  9:57             ` Phillip Wood
2026-10-08  3:43               ` 重田一聖
2026-10-05 16:43         ` Junio C Hamano [this message]
2026-10-08 13:58           ` 重田一聖
2026-10-09 19:05             ` Junio C Hamano
2026-10-10  6:34               ` 重田一聖

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

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

  git send-email \
    --in-reply-to=xmqq1pa4ksiw.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=kazumasa.shigeta@kanamei.com \
    --cc=phillip.wood@dunelm.org.uk \
    --cc=ps@pks.im \
    --cc=shabbir.r.bhojani@gmail.com \
    /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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox