Re: Feature request: make reset --hard add something to the reflog

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

 



On 2025-05-19 at 21:28:07, Junio C Hamano wrote:
> I do not offhand have a strong objection for the _feature_, but if
> the implementation uses the default "stash", that is a bit
> worrysome, as anybody, even a script, using "reset --hard" would add
> a new stash entry, shifting the end-user's expectation of what the
> Nth stash entry records behind user's back.

Yes, this would need to live under a different ref.  We could use the
same stash machinery, though, with a small refactor.

> Doesn't "reset --hard" add record to the reflog already, by the way?
> I agree that a way to recover the local modifications that "reset
> --hard" is designed to get rid of is a good addition.  I just do not
> know what the best vehicle to store the local modifications is.

It does, at least when it changes HEAD.  But it doesn't preserve the
local modifications anywhere, which is really the request that's being
made.
-- 
brian m. carlson (they/them)
Toronto, Ontario, CA

Attachment: signature.asc
Description: PGP signature


[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