Actions
Bug #1318
closedundo" utility patch (second [-t transaction-id]
Status:
Closed
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
Due date:
% Done:
0%
Estimated time:
Description
Hello (from a user you've never heard of or from before),
I noticed when poking around in src/usr.bin/undo/undo.c that while
something is read and stored from the second [-t transaction-id]
argument, it is not actually used subsequently. Man page says:
A second -t specification may be given when the -d or -D option
is used, to provide two end-points for the diff. The file as-of
the second -t is used instead of the current version of the file.
But this does not happen, since ts2.tid is never used after being set
in main() - ts1 is passed on to doiterate, but not ts2. Subsequently,
another ts2 comes of use in the doiterate function.
As a result, for example, using "undo -d" followed by two identical -t
arguments for a file does not result in an empty diff, but rather the
exact same diff as with one instance of the transaction id. This
simple patch fixes that.
Files
Actions