Reading view

There are new articles available, click to refresh the page.

Rewriting a file’s history

Never take file attributes such as datestamps at face value. It’s only too easy to pull tricks by changing the system clock, and it’s straightforward to construct a bogus file with a made-up history.

In my case, I had a genuine excuse for a little gentle fabrication. As I’ve explained before, I use the saved versions of source code files I edit in Xcode to revert changes and similar. In this case, I wanted to merge and clean up saved versions in two copies of what would have been the same file, part of the source of LogUI. A couple of times during its development I have forked my source, and in this case have two files, one containing all the changes I made up to last summer, and the other with all those made since.

The first contains 120 saved versions dating back to the initial version on 8 July 2024, listed here in Revisionist.

The second took those on from 7 June 2025 up to last weekend, for LogUI build 77, released yesterday.

Some of the 130 versions were duplicates, so for efficiency I wanted to remove those and join the two sets of versions into one. I therefore dragged and dropped those two files onto Versatility, which saved all their versions into two folders. I then merged those into a single folder containing the versions I wanted to keep.

When Versatility reassembles those into a single file, it adds each version in numeric order, ignoring any gaps in numbering. As the version files from the first were numbered from 000 to 119, all I had to do was renumber those from the second from 200 to 209, put them into the same folder, and remove duplicate versions identified from Revisionist’s listings of the original versions.

When I dropped that composite folder onto Versatility it composed them into a single file, with 98 versions stretching from 8 July 2024 to 18 October 2025.

The date of creation of that file, which was actually 19 October 2025, is given as 7 June 2025, with a date of last modification a day before it was really created.

There, in that brand new file, are those 98 versions going right back to the first 15 months ago, each safely tucked away in the macOS version database. The version files from the first of the two source code files each have creation dates of 8 July 2024, although the Mac mini M4 Pro they are now stored on didn’t exist until that October, and its first macOS was installed on 1 November 2024.

Versatility and Revisionist are both available from their Product Page.

❌