views:

202

answers:

1

I am using the latest version of Git (1.6.6) on a Mac. My wife wants to use Git to manage her fiction writing as long as she can still use Microsoft Word 2008 (Mac). Instead of pushing her into saving everything as plain text, I would like to use Git Difftool to pass the files to Word and use Word's Compare Documents feature. She wouldn't be able to use Git Diff since Word docs are binary files but she could still use Git Difftool.

I have written an Applescript which takes two filenames in this format: /Users/foo/Documents/my_novel.docx and opens Word to do the file comparison. However, Git Difftool seems to only pass the bare filenames (e.g. my_novel.docx) as parameters.

Is there anyway to get the full filenames from Git Difftool?

Thanks,

Doug

A: 

Your applescript knows what the current directory is, make it use it.

Or you could write a wrapper script, bash does the job:

#!/bin/bash
exec YourAppleScript "$(realpath "$1")" "$(realpath "$2")"

Save file and make it executable.

Tobu