Use bash and fix the here document.
[git-central.git] / scripts / create-stable
1 #!/bin/bash
2 #
3 # Creates a separate DAG in the repo to merge stable into.
4 #
5 # See the other docs about why this is a good idea.
6 #
7
8 # Make a root directory tree with no files in it
9 config_tree_hash=$(git mktree <<FOO
10 FOO
11 )
12
13 # Commit the root directory tree
14 commit_hash=$(git commit-tree $config_tree_hash <<FOO
15 Initial commit on stable branch.
16 FOO
17 )
18
19 echo "Made stable 0.0 commit $commit_hash"
20
21 # Save the commit to the stable ref for later pushing to origin
22 git update-ref refs/heads/stable "$commit_hash" 0000000000000000000000000000000000000000
23