{"action":"closed","issue":{"url":"https://api.github.com/repos/git-for-windows/git/issues/900","repository_url":"https://api.github.com/repos/git-for-windows/git","labels_url":"https://api.github.com/repos/git-for-windows/git/issues/900/labels{/name}","comments_url":"https://api.github.com/repos/git-for-windows/git/issues/900/comments","events_url":"https://api.github.com/repos/git-for-windows/git/issues/900/events","html_url":"https://github.com/git-for-windows/git/issues/900","id":178972143,"number":900,"title":"Support textual diffs for docm and dotm","user":{"login":"atavakoli","id":6012256,"avatar_url":"https://avatars.githubusercontent.com/u/6012256?v=3","gravatar_id":"","url":"https://api.github.com/users/atavakoli","html_url":"https://github.com/atavakoli","followers_url":"https://api.github.com/users/atavakoli/followers","following_url":"https://api.github.com/users/atavakoli/following{/other_user}","gists_url":"https://api.github.com/users/atavakoli/gists{/gist_id}","starred_url":"https://api.github.com/users/atavakoli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/atavakoli/subscriptions","organizations_url":"https://api.github.com/users/atavakoli/orgs","repos_url":"https://api.github.com/users/atavakoli/repos","events_url":"https://api.github.com/users/atavakoli/events{/privacy}","received_events_url":"https://api.github.com/users/atavakoli/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-09-23T20:58:55Z","updated_at":"2016-09-24T18:50:41Z","closed_at":"2016-09-24T18:50:41Z","body":" - [x] I was not able to find an [open](https://github.com/git-for-windows/git/issues?q=is%3Aopen)\r\n   or [closed](https://github.com/git-for-windows/git/issues?q=is%3Aclosed) issue\r\n   matching what I'm seeing\r\n\r\n**Note:** #355 exists, but has been closed, and doesn't mention `do[ct]m` files. If preferred,\r\nI can close this issue and request reopening that one.\r\n\r\n### Setup\r\n\r\n - Which version of Git for Windows are you using? Is it 32-bit or 64-bit?\r\n\r\n64-bit\r\n\r\n```\r\n$ git --version --build-options\r\ngit version 2.7.0.windows.1\r\n```\r\n\r\n - Which version of Windows are you running? Vista, 7, 8, 10? Is it 32-bit or 64-bit?\r\n\r\nWindows 8.1 Pro 64-bit\r\n\r\n```\r\n$ cmd.exe /c ver\r\nMicrosoft Windows [Version 6.3.9600]\r\n```\r\n\r\n - What options did you set as part of the installation? Or did you choose the\r\n   defaults?\r\n\r\n```\r\n$cat /etc/install-options.txt\r\nPath Option: BashOnly\r\nSSH Option: OpenSSH\r\nCRLF Option: CRLFCommitAsIs\r\nBash Terminal Option: MinTTY\r\nPerformance Tweaks FSCache: Enabled\r\n```\r\n\r\n - Any other interesting things about your environment that might be related\r\n   to the issue you're seeing?\r\n\r\nNo, but I can get the desired behavior by updating /mingw64/gitattributes and\r\n/usr/bin/astextplain like so (respectively):\r\n\r\n```diff\r\n@@ -2,8 +2,12 @@\r\n *.DOC  diff=astextplain\r\n *.docx diff=astextplain\r\n *.DOCX diff=astextplain\r\n+*.docm diff=astextplain\r\n+*.DOCM diff=astextplain\r\n *.dot  diff=astextplain\r\n *.DOT  diff=astextplain\r\n+*.dotm diff=astextplain\r\n+*.DOTM diff=astextplain\r\n *.pdf  diff=astextplain\r\n *.PDF  diff=astextplain\r\n *.rtf  diff=astextplain\r\n```\r\n\r\n```diff\r\n@@ -11,7 +11,7 @@ case \"$1\" in\r\n        *.doc | *.DOC | *.dot | *.DOT)\r\n                antiword -m UTF-8 \"$1\" | sed \"s/\\^M$//\" || cat \"$1\"\r\n                ;;\r\n-       *.docx | *.DOCX)\r\n+       *.docx | *.DOCX | *.docm | *.DOCM | *.dotm | *.DOTM)\r\n                docx2txt.pl \"$1\" -\r\n                ;;\r\n        *.pdf | *.PDF)\r\n@@ -27,4 +27,4 @@ case \"$1\" in\r\n                ;;\r\n esac\r\n```\r\n\r\nI have a branch with the above fixes (along with another for git-extra/git-extra.install), ready to be pushed to the git-for-windows/build-extra project.\r\n\r\n### Details\r\n\r\n - Which terminal/shell are you running Git from? e.g Bash/CMD/PowerShell/other\r\n\r\nBash\r\n\r\n - What commands did you run to trigger this issue? If you can provide a\r\n   [Minimal, Complete, and Verifiable example](http://stackoverflow.com/help/mcve)\r\n   this will help us understand the issue.\r\n\r\n```\r\n<create myfile.docm with some content>\r\n\r\n$ git add myfile.docm\r\n\r\n$ git commit -m \"Add docm file\"\r\n[master f0f0f0f] Add docm file\r\n 1 file changed, 0 insertions(+), 0 deletions(-)\r\n create mode 100644 myfile.docm\r\n\r\n$ git show\r\ncommit f0f0f0f000000000000000000000000000000\r\nAuthor: Me <me@me.me>\r\nDate:   Fri Sep 23 16:44:33 2016 -0400\r\n\r\n    Add docm file\r\n\r\ndiff --git a/myfile.docm b/myfile.docm\r\nnew file mode 100644\r\nindex 0000000..e8186b6\r\nBinary files /dev/null and b/myfile.docm differ\r\n```\r\n\r\n - What did you expect to occur after running these commands?\r\n\r\nI expected to see the new file's contents after running `git show` (i.e. what I would've seen if I'd\r\nsaved the file as .docx).\r\n\r\n - What actually happened instead?\r\n\r\nI got \"Binary files ... differ\" instead of a textual diff.\r\n\r\n - If the problem was occurring with a specific repository, can you provide the\r\n   URL to that repository to help us with testing?\r\n\r\nN/A"}}
{"actor":{"display_login":"dscho"}}