Fix crash if snapshotting a config_snapshot#5293
Fix crash if snapshotting a config_snapshot#5293pks-t merged 1 commit intolibgit2:masterfrom csware:config_snapshot-snapshot
Conversation
|
Another approach (maybe with better performance) could be to just increase the reference counter and return the very same instance for |
Signed-off-by: Sven Strickroth <email@cs-ware.de>
|
Interesting! It's snapshots all the way down! I don't see why we wouldn't allow a snapshot to be created from another snapshot. This seems like a reasonable fix. I agree that it's not as performant as it could be but I also think that this is an uncommon enough use case (you're obviously the first person to try it 😀) that I'm happy enough to worry about the performance if/when it becomes an issue that you encounter. That is to say, if all users are happy enough with the perf, then I'm happy enough with the perf. 😄 I'd love @pks-t's thoughts. |
pks-t
left a comment
There was a problem hiding this comment.
Yup. When I implemented the generic snapshot backend I didn't yet want to go all in, but my intent was to make snapshots snapshottable, as well. It's nice to see all these refactorings in the config code to pay out in the end when there's only a single line needed to implement this.
Thanks a lot for your PR!

Partly fixes issue #5292.