public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox•com>
To: Yuri <yuri@tsoft•com>
Cc: Git Mailing List <git@vger•kernel.org>
Subject: Re: 'git stash push -- {dir}' puts files in stash that are outside of {dir}
Date: Wed, 26 Jul 2023 11:14:20 -0700	[thread overview]
Message-ID: <xmqqo7jyczgj.fsf@gitster.g> (raw)
In-Reply-To: <792f71bb-2b9a-2e2b-80ea-9e3afd9fbfb4@tsoft.com> (yuri@tsoft.com's message of "Wed, 26 Jul 2023 10:36:16 -0700")

Yuri <yuri@tsoft•com> writes:

> On 7/26/23 10:29, Junio C Hamano wrote:
>> Are there configuration variables set to affect the behaviour of the
>> "git stash" command in your environment that I do not have (I have
>> nothing in "git config -l | grep stash" output), which may be
>> affecting why it does not reproduce for me?
>
>
> "git config -l | grep stash" doesn't print anything.

Another thing to try.  The command internally uses some internal
form of "git diff" to find out what to save and reset to the HEAD
version in the working tree, so if you have an exotic configuration
variable that affects the way "diff" behaves, it _could_ trigger a
symptom like that (needless to say, the internal invocation of "git
diff" should have prepared for such an end-user configuration and
explicitly countermanded it, but people add configuration variables
after a command was implemented without thinking the ramification
through and especially when they are rarely used ones that do not
usually appear on Git developers' radar, such a bad interaction can
go unnoticed for a long time).

      reply	other threads:[~2023-07-26 18:14 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-26 17:05 'git stash push -- {dir}' puts files in stash that are outside of {dir} Yuri
2023-07-26 17:29 ` Junio C Hamano
2023-07-26 17:36   ` Yuri
2023-07-26 18:14     ` Junio C Hamano [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

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

  git send-email \
    --in-reply-to=xmqqo7jyczgj.fsf@gitster.g \
    --to=gitster@pobox$(echo .)com \
    --cc=git@vger$(echo .)kernel.org \
    --cc=yuri@tsoft$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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