diff --git a/.gitignore b/.gitignore index e856a6b..eecc993 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ node_modules/** build/** -.DS_Store \ No newline at end of file +git-test +.DS_Store diff --git a/.vscode/settings.json b/.vscode/settings.json index 89d1965..4887642 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,4 +1,13 @@ { "editor.formatOnSave": true, - "editor.defaultFormatter": "esbenp.prettier-vscode" -} \ No newline at end of file + "editor.defaultFormatter": "esbenp.prettier-vscode", + "[shellscript]": { + "editor.defaultFormatter": "foxundermoon.shell-format" + }, + "[ignore]": { + "editor.defaultFormatter": "foxundermoon.shell-format" + }, + "[properties]": { + "editor.defaultFormatter": "foxundermoon.shell-format" + } +} diff --git a/scripts/test.sh b/scripts/test.sh new file mode 100755 index 0000000..c35b808 --- /dev/null +++ b/scripts/test.sh @@ -0,0 +1,29 @@ +#!/bin/bash +# A script to quickly generate a random diff and display it. Hopefully this will +# help repro https://github.com/banga/git-split-diffs/issues/16. + +set -e +set -x + +cd git-test + +git init +touch src.ts + +choice=$((RANDOM % 2)) + +case $choice in +0) + echo 'Appending some lines' + cat ../src/context.ts >>src.ts + ;; +1) + echo 'Deleting half the lines' + sed -i '' -n 'p;n' src.ts + ;; +esac + +git commit -am "$(date)" +git show + +cd -