This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Check for .ipynb files with output cells; | |
# ask the user if they really want to commit them | |
ipynb_files=`git diff --staged --name-only | awk "/.ipynb/"` | |
have_output="" | |
if [ -n "$ipynb_files" ]; then | |
while read filename; do | |
if [ $(git show :$filename | grep -cm1 "\"output_type\":") -ge 1 ]; then |