Thread (1 message) 1 message, 1 author, 2020-05-20

Re: [PATCH v13 04/13] reftable: file format documentation

From: Junio C Hamano <hidden>
Date: 2020-05-20 17:33:32

Han-Wen Nienhuys [off-list ref] writes:
On Wed, May 20, 2020 at 7:20 PM Han-Wen Nienhuys [off-list ref] wrote:
quoted
Jonathan Nieder said that this is used for git-stash, but I have never
understood why this is necessary, and would love to clarify this
better.
The doc says this:

"The `log_type = 0x0` is mostly useful for `git stash drop`, removing an
entry from the reflog of `refs/stash` in a transaction file (below),
without needing to rewrite larger files. Readers reading a stack of
reflogs must treat this as a deletion."
Yup, I saw that and that is where my "I am guessing that log_type of
0x0 is *NOT* used for that purpose)." in my review comment came from.

The "git stash" itself is an abuse of the reflog mechanism, but its
"drop" subcommand is probably the worst offender.  It wants to remove
any arbitrary reflog entry in the middle of a reflog, not just topmost
ones (pop) or bottommost ones (expire).
I should probably look at the code for git-stash to see how this plays out.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help