{"thread":{"id":"21947","subject":"How can I get full filenames from Git difftool (for Microsoft Word “Compare Documents” feature)?","startedAt":"2009-12-14T06:25:30Z","lastAt":"2009-12-14T13:11:12Z","messageCount":3,"participants":["Doug Ireton","Matthieu Moy","Jeff Epler"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"129832","messageId":"b507cb050912132225j1bdc39c2v42a3bf6bddf1cb1a@mail.gmail.com","threadId":"21947","inReplyTo":"b507cb050912132222x7e1daa9cw73b13f3db0ee22c6@mail.gmail.com","subject":"How can I get full filenames from Git difftool (for Microsoft Word “Compare Documents” feature)?","fromName":"Doug Ireton","fromEmail":"dougireton@gmail.com","sentAt":"2009-12-14T06:25:30Z","receivedAt":"2009-12-14T06:25:30Z","isPatch":false,"sender":{"key":"dougireton@gmail.com","avatar":null},"body":"I am using the latest version of Git (1.6.6) on a Mac. My wife wants\nto use Git to manage her fiction writing as long as she can still use\nMicrosoft Word 2008 (Mac). Instead of pushing her into saving\neverything as plain text, I would like to use Git Difftool to pass the\nfiles to Word and use Word's Compare Documents feature. She wouldn't\nbe able to use Git Diff since Word docs are binary files but she could\nstill use Git Difftool.\n\nI have written an Applescript which takes two filenames in this\nformat: /Users/foo/Documents/my_novel.docx and opens Word to do the\nfile comparison. However, Git Difftool seems to only pass the bare\nfilenames (e.g. my_novel.docx) as parameters.\n\nIs there anyway to get the full filenames from Git Difftool?\n\nThanks,\n\nDoug Ireton\n"},{"id":"129833","messageId":"vpqd42i56ra.fsf@bauges.imag.fr","threadId":"21947","inReplyTo":"b507cb050912132225j1bdc39c2v42a3bf6bddf1cb1a@mail.gmail.com","subject":"Re: How can I get full filenames from Git difftool (for Microsoft Word “Compare Documents” feature)?","fromName":"Matthieu Moy","fromEmail":"matthieu.moy@grenoble-inp.fr","sentAt":"2009-12-14T07:55:53Z","receivedAt":"2009-12-14T07:55:53Z","isPatch":false,"sender":{"key":"matthieu.moy@grenoble-inp.fr","avatar":"https://gravatar.com/avatar/72c8a2705971a25dfaff23cece15130d405685845d911aedd5667ace277f3fc5?d=mp&s=160"},"body":"Doug Ireton <dougireton@gmail.com> writes:\n\n> I am using the latest version of Git (1.6.6) on a Mac. My wife wants\n> to use Git to manage her fiction writing as long as she can still use\n> Microsoft Word 2008 (Mac). Instead of pushing her into saving\n> everything as plain text, I would like to use Git Difftool to pass the\n> files to Word and use Word's Compare Documents feature. She wouldn't\n> be able to use Git Diff since Word docs are binary files but she could\n> still use Git Difftool.\n\nIf you're interested in diff-ing the _text_ itself, you can use the\ntextconv filter of Git, together with antiword (or catdoc, which does\nthe same thing, but I think antiword works better).\n\nSee this:\n\nhttp://git.or.cz/gitwiki/GitTips#HowtousegittotrackOpenDocument.28OpenOffice.2CKoffice.29files.3F\n\nand adapt by replacing \"OpenOffice\" with MS Word, and odt2txt with\nantiword.\n\n-- \nMatthieu Moy\nhttp://www-verimag.imag.fr/~moy/\n"},{"id":"129870","messageId":"20091214131112.GC22735@unpythonic.net","threadId":"21947","inReplyTo":"b507cb050912132225j1bdc39c2v42a3bf6bddf1cb1a@mail.gmail.com","subject":"Re: How can I get full filenames from Git difftool (for Microsoft Word “Compare Documents” feature)?","fromName":"Jeff Epler","fromEmail":"jepler@unpythonic.net","sentAt":"2009-12-14T13:11:12Z","receivedAt":"2009-12-14T13:11:12Z","isPatch":false,"sender":{"key":"jepler@unpythonic.net","avatar":"https://avatars.githubusercontent.com/u/1517291?v=4"},"body":"In the bash shell, you can convert a relative path to absolute by prepending\nthe directory name:\n    mkabs () {\n        case \"$1\" in\n        /*) echo \"$1\" ;;\n        *)  echo \"$(pwd)/$1\" ;;\n        esac\n    }\n\nUsing it at the shell prompt:\n    $ mkabs example\n    /home/jepler/example\n    $ ls -l $(mkabs example)\n    -rw-r--r-- 1 jepler jepler 0 2009-12-14 07:08 /home/jepler/example\n\nIf mac has a gnu-like readlink(1), then use 'readlink -f' instead of the\nmkabs shell function:\n    $ readlink -f example\n    /home/jepler/example\n\nYou should be able to write a shell script which does the conversion\nfrom relative to absolute using one of these patterns, and then invokes\nthe applescript.\n\nIt may turn out that there's a way to convert a path from relative to\nabsolute in applescript as well, but I wouldn't know it.\n\nJeff\n"}]}