I have a snapshot that includes parent and all of its child directories. When making this snapshot, Restic couldn’t find a parent snapshot, so it rescanned all the files but it looks like the de-dup worked and it only added d since it found checksums for the other files.
If I forget the foo and bar snapshot, will I lose the files a, b, and c from my repo, or does the content remain?
If the four lines you show above represents four different snapshots (one per line), and you remove the first three snapshots (only leaving one snapshot for parent/new/d), then if you after that run the prune command, the repository will only contain data for the files that are referenced in the remaining snapshot. Does that answer your question?
To be more specific, the forget command only removes snapshots, not the actual data that was referenced by those snapshots in the repository. The latter is removed when you run the prune command. But of course only the data that is no longer referenced by any of the remaining snapshot(s) is removed, such that the remaining snapshot still has all the data for all the files that it references (in other words, the files that you backed up when creating that snapshot).