campaigns: skip changeset spec creation for cached empty diffs
Created by: LawnGnome
It's totally valid and normal for empty diffs to be created when executing campaign specs: sometimes you just don't want anything to change, even though the repo matched the initial query. When this happens, #313 added a check that prevents the changeset spec from being created, and print a verbose mode message indicating that the repo was skipped:
So far, so good. In #374, we made our empty diff handling even better by caching the empty diff: this means that we don't have to recalculate that nothing happened. Unfortunately, the check that exists in the cache miss code path to skip changeset spec creation doesn't exist in the cache hit code path, which means that on subsequent applications of the campaign, a changeset spec with an empty diff will be uploaded, and gitserver will ultimately be very grumpy.
By applying the same logic to the cache hit code path, we can filter out these problematic changeset specs.