Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
filter-repo: limit searches for ref values to actual refs
The FreeBSD repository has refs that look like ref expressions. For example: refs/tags/vendor/openzfs/2.0-rc3-gfc5966 This is a tag. However, if you rewrite the FreeBSD history to only include the libexec/ftpd directory, then this tag pre-dated any file within that directory and thus should be deleted. Once that tag is deleted, trying to pass it to `git cat-file --batch-check` will result in the value of refs/tags/vendor/openzfs/2.0-rc3-gfc5966 being printed as the value of some blob. refs/tags/vendor/openzfs/2.0-rc3-gfc5966 but notices the `-gfc5966` extension and goes looking for any object whose name begins with `fc5966`. Since it turns out there is one object that starts with that name and there is only one, and it happens to be a blob, `git cat-file` will say, oh, you must have been asking for blob fc5966c9c467e0a7d460498b7581e845d33d89d7 This matters to code that runs after the new history has been writtten and refs have been updated, but before the old history has been pruned. Since we are specifically just wanting to know the values of refs, use show-refs instead. Signed-off-by: Elijah Newren <[email protected]>
- Loading branch information