When using a patch from a gitlab commit, the length of the truncated index can vary based on the size of the repository. I’ve observed that the .diff
version contains the full index (as you would obtain by running git diff --full-index
, but the .patch
version does not.
Is this behavior something we can rely on? I am Homebrew maintainer and we would prefer our external patches to remain stable, i.e., not change their contents over time.
.patch
version (lacks full index).diff
version (has full index)- Homebrew issues: #43156, #43161
-
man git-diff
:--full-index Instead of the first handful of characters, show the full pre- and post-image blob object names on the "index" line when generating patch format output.