mirror of
https://github.com/git-learning-game/oh-my-git.git
synced 2024-12-26 20:33:20 +01:00
11 lines
387 B
Text
11 lines
387 B
Text
|
TREES=$(git cat-file --batch-check='%(objectname) %(objecttype)' --batch-all-objects | grep tree | cut -f1 -d" ")
|
||
|
|
||
|
ALL_TREE_CHILDREN=$(for TREE in $TREES; do
|
||
|
git cat-file -p $TREE | cut -f1 | cut -f3 -d" "
|
||
|
done)
|
||
|
|
||
|
NUMBER_OF_CHILDREN=$(echo "$ALL_TREE_CHILDREN" | wc -l)
|
||
|
UNIQUE_CHILDREN=$(echo "$ALL_TREE_CHILDREN" | sort -u | wc -l)
|
||
|
|
||
|
test "$NUMBER_OF_CHILDREN" -gt "$UNIQUE_CHILDREN"
|