Allow multiple level sets, pull out default order into "sequence" file

This commit is contained in:
Sebastian Morr 2020-09-22 16:12:03 +02:00
parent a9f096636a
commit 5031009dd5
96 changed files with 37 additions and 29 deletions
levels/bottom-up/commit-parents

View file

@ -0,0 +1,7 @@
When using the commit-tree command, you can optionally specify a parent:
git commit-tree <tree> -m "Description" -p <parent commit>
Make a string of three commits!
Hint: You'll need a tree object. What could be the easiest way to obtain one?

View file

@ -0,0 +1,4 @@
git write-tree
FIRST_COMMIT=$(git commit-tree 4b82 -m 'First commit :O')
SECOND_COMMIT=$(git commit-tree 4b82 -p $FIRST_COMMIT -m 'Second commit :D')
THIRD_COMMIT=$(git commit-tree 4b82 -p $SECOND_COMMIT -m 'Third commit \o/')

View file

View file

@ -0,0 +1,10 @@
COMMITS=$(git cat-file --batch-check='%(objectname) %(objecttype)' --batch-all-objects | grep commit | cut -f1 -d" ")
for COMMIT in $COMMITS; do
echo a commit named $COMMIT
if [ $(git rev-list $COMMIT | wc -l) -ge 3 ]; then
exit 0
fi
done
exit 1