# Re: [PATCH] reset: avoid reflog update on no-op reset

2 messages from 2026-01-23 to 2026-01-23. Participants: Pushkar Singh, Junio C Hamano.
Thread: https://gitlist.dev/t/64855

## Pushkar Singh, 2026-01-23 08:54

Subject: Re: [PATCH] reset: avoid reflog update on no-op reset
Message-ID: <SL2P216MB1885C5C9B75A38AE99E5511DA294A@SL2P216MB1885.KORP216.PROD.OUTLOOK.COM>
URL: https://gitlist.dev/e/SL2P216MB1885C5C9B75A38AE99E5511DA294A%40SL2P216MB1885.KORP216.PROD.OUTLOOK.COM

```
Thanks, that makes sense.

I was reasoning about reflog entries purely in terms of reference
updates, but I see your point that "git reset" also uses the reflog
as a record of user actions, even when the target happens to match
HEAD.

In that light, skipping the reflog entry on a no-op reset could indeed
break the assumption that "@{1}" reliably refers to "the state before
the most recent reset", both for scripts and for humans inspecting
history.

I agree that this makes the change questionable as-is. I’m happy to
drop this patch, or to rework it in a way that preserves the reflog
entry while addressing the underlying concern (if there is one).

Thanks for the detailed explanation.
```

## Junio C Hamano, 2026-01-23 16:18

Subject: Re: [PATCH] reset: avoid reflog update on no-op reset
Message-ID: <xmqq7bt8joae.fsf@gitster.g>
URL: https://gitlist.dev/e/xmqq7bt8joae.fsf%40gitster.g
In-Reply-To: <SL2P216MB1885C5C9B75A38AE99E5511DA294A@SL2P216MB1885.KORP216.PROD.OUTLOOK.COM>

```
Pushkar Singh <pushkarkumarsingh1970@gmail.com> writes:

> ... or to rework it in a way that preserves the reflog
> entry while addressing the underlying concern (if there is one).

I am OK as long as this patch does not come back in its current form
;-), but it is curious what "the underlying concern" is.  It sounds
like you see some problems that need to be addressed if the current
"the act of resetting to the same commit is recorded in the reflog",
but I am not sure what they are.

Thanks.

```
