Git development
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Phillip Wood <phillip.wood123@gmail.com>
Cc: git@vger.kernel.org, 重田一聖 <kazumasa.shigeta@kanamei.com>
Subject: Re: [PATCH 1/2] stash create: remove duplicate changes detection
Date: Tue, 06 Oct 2026 05:44:19 -0700	[thread overview]
Message-ID: <xmqqpkxngfrw.fsf@gitster.g> (raw)
In-Reply-To: <1617d92942d283017272ca6f27f1254f8f9389b0.1791218125.git.phillip.wood@dunelm.org.uk> (Phillip Wood's message of "Mon, 5 Oct 2026 17:35:30 +0100")

Phillip Wood <phillip.wood123@gmail.com> writes:

> From: Phillip Wood <phillip.wood@dunelm.org.uk>
>
> Before it creates a stash, git checks if there are any unstaged,
> or uncommitted changes. If there isn't anything to stash it bails
> out. Since ef0f0b4509 (stash: optimize `get_untracked_files()`
> and `check_changes()`, 2019-02-25) "git stash store" has checked

"store"?  Aren't we talking about "create"?

> unreliable (the scripted version of "git stash store", called "git
> update-index -q --refresh" before looking for any changes).

Ditto.

> Avoid checking for changes twice by removing the call to
> check_changes_tracked_files() from store_stash() and restore the return
> code handling in store_stash() that was removed by ef0f0b4509 so that
> we continue to exit 0 when there are no changes to stash. In principle
> we could remove the call to check_changes() from do_store_stash()
> instead, but then we'd need to pass in the list of untracked files.

Again "(do_)?store" -> "\1create"?


  reply	other threads:[~2026-10-06 12:44 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-05 16:35 [PATCH 0/2] stash: stop checking for changes twice Phillip Wood
2026-10-05 16:35 ` [PATCH 1/2] stash create: remove duplicate changes detection Phillip Wood
2026-10-06 12:44   ` Junio C Hamano [this message]
2026-10-07 13:49     ` Phillip Wood
2026-10-05 16:35 ` [PATCH 2/2] stash push: " Phillip Wood
2026-10-06 14:27   ` Junio C Hamano
2026-10-07 13:46     ` Phillip Wood
2026-10-07 17:15       ` Junio C Hamano
2026-10-08 13:35         ` Phillip Wood

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=xmqqpkxngfrw.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=kazumasa.shigeta@kanamei.com \
    --cc=phillip.wood123@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