Skip to content

Instantly share code, notes, and snippets.

@chalstrick
Last active August 29, 2015 14:14
Show Gist options
  • Save chalstrick/106303c9e6244d072311 to your computer and use it in GitHub Desktop.
Save chalstrick/106303c9e6244d072311 to your computer and use it in GitHub Desktop.
testGitBannedPathes
uname -a
git --version
[ -x ./gin ] || curl -O https://raw.githubusercontent.com/chalstrick/gin/master/gin && chmod +x gin
git init test
cd test
blobId=$(echo "test content" | git hash-object -w --stdin)
goodTree=$(echo -e "100644 blob $blobId\tf" | git mktree)
tree1Id=$(echo -e "100644 blob $blobId\tRAGGED~1.H" | git mktree)
tree2Id=$(echo -e "040000 tree $goodTree\ta\n040000 tree $tree1Id\tb\n040000 tree $goodTree\tc" | git mktree)
commitId=$(echo 'initial commit' | git commit-tree $tree2Id)
git update-ref refs/heads/master $commitId
git reset --hard master
../gin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment