forgejo-aneksajo/modules/annex
Matthias Riße 02ad4ab33d git-annex: include annexed files in zip and tar.gz
This extends the archive creation logic to add annexed files to the
created archives. The basic flow is this:
1. Create an archive using `git archive`
2. Read in that archive and write out a new one, replacing all annexed
   files with their annexed content; leaving the git-only files as-is

The file permissions with which the annexed files are put into the
archive are decided based on what `git archive` does for other files as
well:
- For tar.gz archives, executable files get permissions 0775 and regular
  files get 0664.
- For zip archives, executable files get permissions 0755 and regular
  files are archived with "FAT permissions" rw, instead of unix
  permissions.

If for a given archive request an annexed file is not present on the
gitea instance then the content as tracked by git (i.e. a symlink or
pointer file) is silently put into the resulting archive instead.

Co-authored-by: Nick Guenther <nick.guenther@polymtl.ca>
2025-01-31 09:44:45 +01:00
..
annex.go Use annexed content for comparison in diffs (#57) 2025-01-31 00:43:20 +00:00
annex_archive.go git-annex: include annexed files in zip and tar.gz 2025-01-31 09:44:45 +01:00