-
Notifications
You must be signed in to change notification settings - Fork 148
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Interaction between erase_prev and history.shared=false #45
Comments
This is an issue with the Clink 1.0.0 rewrite (or maybe it's always been present in Clink). Maybe non-shared history mode can keep track of a high water mark that it's read, and never reload stuff from before that point. But This might be very problematic to solve. |
Make `history.shared` default to true.
Live with #45 for now; changing the default is disruptive, and there's no clear solution yet.
UPDATE: a more functional idea is in the next comment. What a mess. |
For now I'll document this as a known limitation. 😞 The most feasible idea I've come up with so far is for each session to keep separate logs of pending deletions and pending additions. Additions can be reaped on session end, but deletions can only be reaped when all sessions have ended. (The I think that would fully addresses the problem, but some further mental gymnastics are needed to verify the hypothesis. I'm on the fence about whether that's a reasonable level of complexity for a solution. |
Fixed by keeping track of removals separately, applying them in memory for a given session during Unfortunately the git fast-forward ruined the history. I'm still letting my opinion of fast-forward form -- I don't yet understand why so many people seem to think that fast-forward merges of topic branches gives a "more accurate" view of history. To me it's a very wrong view of history because it makes it appear as though part of a topic branch feature was done in the topic branch and part of it was done in master. When in reality the entire feature was done in the topic branch. I see claims about various "problems" and "dragons" if you don't fast-forward, but so far I haven't seen any actual evidence of problems, only an apparent preference for throwing out parallel history and rewriting it as interleaved mixed up synthesized sequential history that never happened. 🤷♂️ Anyway, the final commit from the |
When
history.dupe_mode
= "erase_prev" andhistory.shared
is false:History entries can temporarily disappear in some instances.
REPRO:
echo hello
.echo hello
history entry is shown.echo hello
removed, andecho hello
was added to instance 1's session history.EXPECTED RESULT:
echo hello
will shown up in the available history.ACTUAL RESULT: it won't be present again until after instance 1 exits and its session histories are appended to the master history.
The text was updated successfully, but these errors were encountered: