Up to Git version 1.7.9, the value of gitdir in the .git file of submodules is an absolute path. This makes the fingerprint of some packages unstable. The fingerprint of packages which have submodules in their src files(e.g. dea_next, daylimit in cf-release) depend on the location where the release repository is cloned. bosh create release generates a new version of the packages even when the source files of them have no changes.
bosh create release
This commit adds a method to rewrite the value of gitdir from a absolute path to a relative path before calculating fingerprints. Since Git 1.7.10 uses relative paths for gitdir by default, this change is compatible with the newer Git versions.
This PR is just a proposal and I think we can choose other way to stabilize fingerprints, such as simply ignoring .git files.
Use relative paths in the .git file in submodules to stabilize packag…
Instead of going down the submodule rabbit hole, I think we should add negative glob to the package spec
Thank you for the comment.
Yes, we can exclude .git files by adding negative globs to specs. I understand that my proposal is adding a special care only to git submodules and it might bring in some inconsistency.
However, I think this special care to git submodules is natural to BOSH because BOSH itself is build on the top of Git and submodules are very common way to include src files. In addition to that, I, personally, don't want to add negative globs to each specs.
Thank you again for the comment. We can use your idea until we get Git 1.7.10.
Closing because this commit does not support git 184.108.40.206 (lucid default), which did not support separated .git directories.