mirror of
https://github.com/git-learning-game/oh-my-git.git
synced 2024-11-03 19:04:40 +01:00
10 lines
387 B
Text
10 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"
|