<html>#2942: Formaline: preserve symlinks in git source snapshots
<table style='border-spacing: 1ex 0pt; '>
<tr><td style='text-align:right'> Reporter:</td><td>Roland Haas</td></tr>
<tr><td style='text-align:right'> Status:</td><td>new</td></tr>
<tr><td style='text-align:right'>Milestone:</td><td></td></tr>
<tr><td style='text-align:right'> Version:</td><td></td></tr>
<tr><td style='text-align:right'> Type:</td><td>bug</td></tr>
<tr><td style='text-align:right'> Priority:</td><td>major</td></tr>
<tr><td style='text-align:right'>Component:</td><td></td></tr>
</table>
<p><span class="ap-mention" data-atlassian-id="557058:8bc23f2a-45c0-477d-8ac4-a5a16c734278">@Zach Etienne</span> reports:</p>
<p>Formaline currently warns and skips symbolic links when updating its git
source snapshot because update-git-repo.pl only accepts regular files.
This causes valid symlinks, including symlinks to directories, to be
omitted from the stored source tree.</p>
<p>Allow symbolic links through the existing file-type check. When the
temporary hard-link staging tree can represent the symlink, the existing
bulk git add path continues to handle it. If hard-link staging fails,
add a symlink-specific fallback that writes the link target as a Git blob
and stages it with mode 120000, which is Git's native representation
for symbolic links.</p>
<p>Broken symlinks are still refused with a warning and removed from the
desired tracked set, matching the existing behavior for missing files
while making the broken-link case explicit.</p>
<p>The fallback path also avoids shell-quoting the Cactus filename directly
by passing paths and link targets through environment variables before
feeding them to <code>git hash-object / git update-index</code>.</p>
<p>--<br/>
Ticket URL: <a href='https://bitbucket.org/einsteintoolkit/tickets/issues/2942/formaline-preserve-symlinks-in-git-source'>https://bitbucket.org/einsteintoolkit/tickets/issues/2942/formaline-preserve-symlinks-in-git-source</a></p>
</html>