[Tcsh] How is merge in savehist supposed to work?

Kimmo Suominen kim at netbsd.org
Thu Apr 4 06:32:30 UTC 2024


Hi Werner, and everyone else:

I've tried to look at the history merge a couple of times, but somehow
never could quite wrap my head around the whole process.

Today, I took a different approach comparing the different patches you
had sent, and trying to deduce which parts worked and which did not.  By
some trial and error, and with the help of the history merge test case
you contributed, I've come to the following conclusions:

- Calling renumberHist() makes the erase mode history test fail (with
  the unwanted results described in the test comments).

- Calling bubbleHnumHrefDown() makes the new history merge test succeed.

- Since we always call bubbleHnumHrefDown(), we don't need to separately
  reset them on history merging anymore.

In the process I've eradicated the fastMergeErase variable completely.

Please review the following pull request, and let me know if anything
seems wrong with it, or if it seems good.  I was really tempted to just
push out another release with this change, as it seems to work fine for
me (albeit in somewhat limited testing), but then thought that some
wider review is probably warranted first.

https://github.com/tcsh-org/tcsh/pull/98/files

Thanks,
+ Kimmo



More information about the Tcsh mailing list