by Morgan Aldridge [email protected]
Client-side hooks for Git projects containing old Mac HFS/HFS+ resource forks. I tossed this together for doing some NewtonScript development in NTK under MacOS 7.x, but it would also be useful for old MPW/CodeWarrior/ThinkC/etc. projects, or any other old Mac files with resource forks.
It performs its magic by using OS X's SplitForks
& FixupResourceForks
to split the resource forks off into AppleDouble format (._
files) prior to committing to the Git repo (otherwise Git would just ignore the resource forks, rendering the files incomplete if you were to checkout a fresh copy), then converting them back to resource forks upon any merge/update/etc.
- Install Xcode Command Line Tools, if you haven't already done so.
- Clone this repository (e.g.
git clone [email protected]:morgant/git-resource-fork-hooks.git
). - Copy the contents of the
hooks/
directory to the.git/hooks/
directory of the project containing Mac files with resource forks (if you have any Git Hooks you're already using, you may need to manually merge them).
- The Dash-Board-for-Newton-OS README for an exciting look behind the scenes of recovering & releasing the source code for NewtonOS software on GitHub (touching on the resource forks issue, of course.)
- AppleDouble format on ArchiveTeam.org
- Git Hooks documentation