From: | Joel Pettersson <joelkpettersson@xxxxxxxxx> |
Date: | Sun, 22 Mar 2009 15:12:47 +0000 |
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. -- - Joel K. Pettersson
Attachment:
undo.patch
Description: Binary data