Re: [PATCH v1 1/1] git stash needing mkdir deletes untracked file

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Torsten

Sorry for the slow reply

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




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux