Gimp doesn't save undo history in the XCF.

I guess the idea is you can do edits via non-destructive layer effects and compositing a stack of layers, where somewhere amongst the stack is your original unmolested data. Though that has not been my experience with Gimp - it's far more likely to want to to commit to a rasterizing decision far earlier than Photoshop would.