Safari bookmarks, git repositories, and automatic updating
I recently added ~/Library/Safari/Bookmarks.plist
to my homedir
git repository in the misguided hope that it would be a magically
sensible way to keep my bookmarks sync’d between my various
systems. This evening was the first real test:
Kay:~ janderson$ pgit pull /Users/janderson remote: Counting objects: 9, done. remote: Compressing objects: 100% (3/3), done. remote: Total 5 (delta 2), reused 0 (delta 0) Unpacking objects: 100% (5/5), done. From ssh://slice1.civilfritz.net/home/janderson/git/home 9d1b3c1..5fdae45 master -> origin/master Updating 9d1b3c1..5fdae45 Fast-forward Library/Safari/Bookmarks.plist | Bin 1951 -> 2498 bytes 1 files changed, 0 insertions(+), 0 deletions(-) /Users/janderson/org Already up-to-date.
Not only did the day’s changes propagate to my local system, but Safari implemented the change immediately, in the current running process, in the current window, without intervention. I’m sure this has something to do with fsevents, but it’s just one more example of the extent of behavior you can get away with if you implement a system properly in the first place. (After all: it’s not as though Apple had this use case in mind.)
Of course, the true test will be how well the file format copes with an n-way merge… but I’ll cross that bridge when git blows up in my face.