git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Torsten Bögershausen" <tboegi@web.de>
To: phillip.wood@dunelm.org.uk
Cc: git@vger.kernel.org, friebetill@gmail.com,
	Junio C Hamano <gitster@pobox.com>,
	Eric Sunshine <sunshine@sunshineco.com>
Subject: Re: [PATCH v1 1/1] git stash needing mkdir deletes untracked file
Date: Tue, 15 Aug 2023 17:25:33 +0200	[thread overview]
Message-ID: <20230815152511.suipgnzr2wgolmsx@tb-raspi4> (raw)
In-Reply-To: <9f76de24-d337-ed41-fb81-888dba0b1656@gmail.com>

On Tue, Aug 15, 2023 at 10:15:37AM +0100, Phillip Wood wrote:
> Hi Torsten
>
> Sorry for the slow reply

No problem.
Thanks for the response, I think that we have an
agreement not to overwrite an untracked file, when a directory
with the same name needs to be created.

I try to come up with a patch series -
starting with the stash operation.

>
> On 09/08/2023 19:47, Torsten Bögershausen wrote:
> > On Wed, Aug 09, 2023 at 02:15:28PM +0100, Phillip Wood wrote:
> > > Hi Torsten
> > >
> > > Thanks for working on this. I've cc'd Junio for his unpack_trees()
> > > knowledge.
> >
> > Thanks Eric for the review.
> >
> > Hej Phillip,
> > I have been playing around with the whole thing some time.
> > At the end I had a version, which did fiddle the information
> > that we are doing a `git stash` (and not any other operation)
> > into entry.c, and all test cases passed.
> > So in principle I can dig out all changes, polish them
> > and send them out, after doing cleanups of course.
>
> I don't think we should be treating "git stash" as a special case here -
> commands like "git checkout" should not be removing untracked files
> unprompted either.
>
> > (And that could take a couple of days, or weeks ;-)
> >
> > My main question is still open:
> > Is it a good idea, to create a "helper file" ?
> > The naming can be discussed, we may stick the date/time
> > into the filename to make it really unique, or so.
>
> I think stopping and telling the user that the file would be overwritten as
> we do in other cases would be better.
>
> > Reading the different reports and including own experience,
> > I still think that a directory called ".deleted-by-user"
> > or ".wastebin" or something in that style is a good idea.
>
> I can see an argument for being able to opt-in to that for "git restore" and
> "git reset --hard" but that is a different problem to the one here.
>
> Best Wishes
>
> Phillip
>

  reply	other threads:[~2023-08-15 15:26 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-21 17:31 Lost files after git stash && git stash pop Till Friebe
2023-07-22 21:44 ` Torsten Bögershausen
2023-07-23 10:01   ` Phillip Wood
2023-07-23 20:52     ` Torsten Bögershausen
2023-07-24  9:59       ` Phillip Wood
2023-08-08 17:26 ` [PATCH v1 1/1] git stash needing mkdir deletes untracked file tboegi
2023-08-08 18:03   ` Torsten Bögershausen
2023-08-08 19:28   ` Eric Sunshine
2023-08-09 13:15   ` Phillip Wood
2023-08-09 18:47     ` Torsten Bögershausen
2023-08-15  9:15       ` Phillip Wood
2023-08-15 15:25         ` Torsten Bögershausen [this message]
2023-08-15 18:03         ` Junio C Hamano
2023-08-09 20:57     ` Junio C Hamano
2023-08-15  9:16       ` 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=20230815152511.suipgnzr2wgolmsx@tb-raspi4 \
    --to=tboegi@web.de \
    --cc=friebetill@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=phillip.wood@dunelm.org.uk \
    --cc=sunshine@sunshineco.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;
as well as URLs for NNTP newsgroup(s).