[vigente/gerardus] dee89f: Exclude deleted .docx files from pandoc conversion

0 views
Skip to first unread message

Ramón Casero

unread,
Mar 1, 2017, 2:06:12 PM3/1/17
to gerardu...@googlegroups.com
Branch: refs/heads/master
Home: https://github.com/vigente/gerardus
Commit: dee89fb2af237f6921ce49a713769a952ecb544b
https://github.com/vigente/gerardus/commit/dee89fb2af237f6921ce49a713769a952ecb544b
Author: Drew T. Doering <dtdo...@wisc.edu>
Date: 2017-01-26 (Thu, 26 Jan 2017)

Changed paths:
M shell-script/pre-commit-git-diff-docx.sh

Log Message:
-----------
Exclude deleted .docx files from pandoc conversion

If you try to commit changes to your repo that include the deletion of a tracked *.docx file, pandoc will try to convert the (now nonexistent) file to *.md, and fail. Since the script executed by the pre-commit hook therefore returns an error, the commit will fail.

A simple workaround is to use the `--diff-filter=d` option, which will *exclude* any deleted files from being passed to pandoc. This creates a need to remove the associated *.md file, which I have added as a separate `for` loop at the bottom.


Commit: 2e1dbe0438bd4a13243ba0241bb5a89636a6dc86
https://github.com/vigente/gerardus/commit/2e1dbe0438bd4a13243ba0241bb5a89636a6dc86
Author: Ramón Casero <rca...@gmail.com>
Date: 2017-03-01 (Wed, 01 Mar 2017)

Changed paths:
M shell-script/pre-commit-git-diff-docx.sh

Log Message:
-----------
Merge pull request #101 from dtdoering/patch-1

Exclude deleted .docx files from pandoc conversion


Compare: https://github.com/vigente/gerardus/compare/2e8c9d48324c...2e1dbe0438bd
Reply all
Reply to author
Forward
0 new messages