Draft: View correct content when blob is a symlink
What does this MR do and why?
This is the continuation of a Community contribution Support for displaying soft link file content (!59108 - closed)
View correct content when blob is a symlink
When we create a symlink, git stores this as a blob with mode 120000 and the data will be the path to the linked file.
Prior to this change we would render the path to the linked file in the UI when it would make more sense to render the linked file.
Now when we visit a symlink we see the correct content e.g.
blob_a is README.md blob_b is a symlink to ./README.md
Viewing blob_b now displays the contents of README.md from blob_a.
Changelog: added
Co-authored-by: Joe Woodward jwoodward@gitlab.com
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
Before | After |
---|---|
![]() |
![]() |
![]() |
![]() |
How to set up and validate locally
NOTE: Banzai caches the rendering so you can either clear you cache between tests or add false &&
to Banzai::Renderer
line 23.
if false && cache_key
- Create a symlinked file
- Push to GDK
- View file
Should now see the actual file rather than the file path that is linked.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.