Closed Russman12 closed 1 year ago
Hi @Russman12 !
Thanks for raising this issue and thanks for contributing in making this project better!
That is very interesting. It seems to be supported and what you did would do the trick
Where do you experience the issue? Locally or in the pipeline?
If it is in the pipeline, does lfs
is installed when the pipeline execute?
Do you have .gitattributes
? If yes, what are those?
I'll try to reproduce it soon, (maybe early next week)
I've encountered this issue both locally and in our pipeline. I have the SFDX cli installed via npm and I just installed sfdx-git-delta so it should be the latest version. I did some more testing and here's what I found:
The project files themselves are resolving fine. The issue only exists in the output from the command when generating the delta files (-d flag). The package.xml is being created as expected. Here's the precise steps I took to reproduce:
git lfs track force-app\main\default\staticresources\example.csv
git commit -am "added example.csvto LFS"
sfdx sgd:source:delta --from "<previous-commit-sha>" -d
After performing those steps, the output directory contains an output\force-app\main\default\staticresources\example.csv file which is a pointer, not the resolved file. Is this the expected behavior?
In our pipeline, the delta files are saved as artifacts which can be referenced later for debugging. They are useful because they describe exactly what was deployed. I found that our pipeline is technically still working since the actual deploy step is using the source files under our project directory, not the files generated by the delta. However, having the pointer files is still problematic for us since we no longer have a way to reliably way see what was deployed. Is there a different or better way you would recommend going about retrieving the files that were deployed?
Shipped in release v5.27.0
.
You can install the new version using the version number or the latest-rc
channel
$ sfdx plugins:install sfdx-git-delta@latest-rc
$ sfdx plugins:install sfdx-git-delta@v5.27.0
Happy incremental deployment!
Is your proposal related to a problem?
It seems git LFS is not fully supported. We would like to add git LFS to our project. We have a pipeline which handles deployment automatically based on the diff generated by this plugin. Unfortunately, when the diff encounters files that are LFS files, they don't get resolved and the pointer files are added to the output directory instead of the actual file. This is an example of the command which is being executed:
sfdx sgd:source:delta --from "7ead58d37b9" --to "HEAD" --output deployment -d
In the resulting deployment directory, the LFS file contents are the LFS pointers.Describe a solution you propose
Add the ability to properly diff git LFS files. There could be a new flag added to the command
--lfs
or maybe it could be something that's automatically detected.Describe alternatives you've considered
I've tried setting the lfs diff in my project git config with the following command:
git config diff.lfs.textconv cat
. This made no difference. Is there perhaps a different git config I can set that might resolve the issue?