public inbox for git@vger.kernel.org
 help / color / mirror / Atom feed
From: Pushkar Singh <pushkarkumarsingh1970@gmail.com>
To: newren@gmail.com
Cc: git@vger.kernel.org, gitster@pobox.com, karthiknayak@gmail.com,
	kh@pks.im, peff@peff.net, ps@pks.im,
	pushkarkumarsingh1970@gmail.com
Subject: Re: [PATCH v2] stash: honor --no-overwrite-ignore with --all
Date: Tue,  3 Feb 2026 18:18:45 +0000	[thread overview]
Message-ID: <20260203181845.602979-1-pushkarkumarsingh1970@gmail.com> (raw)
In-Reply-To: <CABPp-BEZkhYW+fWgtGn8yHuLfak+UYo9A_HwdiCkAf5A0H6hBA@mail.gmail.com>

Hi Elijah,

Thanks for the detailed feedback. Much appreciated.

> What's the basis for this patch? I don't see any "overwrite-ignore"
> anywhere in builtin/stash.c .

The basis was the existing behavior where git stash push -a would remove
ignored files even when --no-overwrite-ignore is provided. The intent was
to make stash honor --no-overwrite-ignore consistently with other callers
of unpack_trees, limited specifically to the stash -a cleanup path.

In v3 I rebased onto current master and also removed the commit message
claim about removing the stash FIXME, since this series only addresses
the concrete stash behavior and does not attempt to solve the broader
unpack_trees issues.

> This suggests that --all and --no-overwrite-ignore are incompatible,
> yes? Shouldn't they be reported as such rather than having one silently
> override the other?

I agree they are philosophically contradictory. I chose to downgrade
INCLUDE_ALL_FILES to include-untracked when --no-overwrite-ignore is given
so that users explicitly requesting preservation of ignored files are not
surprised by their removal.

I am open to changing this to an explicit error instead if that is
preferred. I went with downgrading to preserve backwards compatibility
and to honor the more conservative option.

> Also, the commit message claims you are removing a FIXME comment, but
> no such removal is found in this patch.

Yes, that was an error in v2. In v3 the commit message no longer claims
to remove the FIXME and is scoped only to fixing stash -a behavior plus
adding regression tests.

Regarding tests, v3 now explicitly covers both:

- stash push -a --no-overwrite-ignore preserving ignored files
- stash push -a --overwrite-ignore removing them

using test_grep and test_path_is_missing as suggested.

Thanks also for the references to the broader unpack_trees and stash
history. I understand this patch only addresses a small part of a much
larger and messier area.

Please let me know if you would prefer the -a plus --no-overwrite-ignore
combination to error out instead of downgrading.

Thanks,
Pushkar

  reply	other threads:[~2026-02-03 18:18 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-02 13:19 [PATCH] stash: honor --no-overwrite-ignore when updating index Pushkar Singh
2026-02-02 14:10 ` Karthik Nayak
2026-02-02 19:37   ` D. Ben Knoble
2026-02-02 14:20 ` Patrick Steinhardt
2026-02-02 14:21 ` Kristoffer Haugsbakk
2026-02-02 16:22 ` [PATCH v2] stash: honor --no-overwrite-ignore with --all Pushkar Singh
2026-02-02 16:48   ` Kristoffer Haugsbakk
2026-02-02 17:09     ` Pushkar Singh
2026-02-02 20:00   ` D. Ben Knoble
2026-02-02 20:31   ` Elijah Newren
2026-02-03 18:18     ` Pushkar Singh [this message]
2026-02-03 19:22       ` Elijah Newren
2026-02-03 18:04   ` [PATCH v3] " Pushkar Singh
2026-02-03 19:22     ` Elijah Newren
2026-02-03 20:07       ` Pushkar Singh

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=20260203181845.602979-1-pushkarkumarsingh1970@gmail.com \
    --to=pushkarkumarsingh1970@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=karthiknayak@gmail.com \
    --cc=kh@pks.im \
    --cc=newren@gmail.com \
    --cc=peff@peff.net \
    --cc=ps@pks.im \
    /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