rev-list --missing fails if start point is missing
We recently extended (!52 (closed)) git rev-list --objects --missing=print to handle missing commits. As described in Implement a way to figure out where quarantined... (&11242 - closed), this helps us in figuring out the dependencies of the transaction's packfile that ultimately gets logged. We run rev-list --objects --missing=print on the transaction's quarantine directory, feeding it the transaction's new reference tips as the starting points of the walk. The objects that are returned by this walk are packed, and the ones returned as missing are considered as the transaction's dependencies.
The dependency objects are used in two ways:
- They are verified to exist in the repository when the transaction is committing. This ensures all of the objects that the write didn't include but its changes depend on exist in the repository.
- The dependencies are used for conflict checking to ensure concurrent pruning operations don't remove them.
While trying out the new functionality, the command handles well scenarios where objects encountered during the walk are missing, and prints them out.
During testing, it came up that the command fails with a fatal: bad object <oid> when the start point of a walk doesn't exist. This is problematic as we feed the new reference tips the transaction is setting in the command. Some of the new reference tips may exist in the quarantine, and some may be existing objects in the repository. It would be preferable to also print them out as missing if they don't exist. That way they can be also marked as a dependency.