You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
500 B
17 lines
500 B
#!/bin/bash |
|
|
|
# Создание графа коммитов git-репозитория |
|
|
|
# This produces output that can be displayed using dotty, for example: |
|
# $ git graphviz HEAD~100..HEAD~60 | dotty /dev/stdin |
|
# $ git graphviz --first-parent master | dotty /dev/stdin |
|
# Note how defining a function eliminates the need to use sh -c. |
|
|
|
make_graphviz() { |
|
echo 'digraph git {' |
|
git log --pretty='format: %h -> { %p }' "$@" | sed 's/[0-9a-f][0-9a-f]*/\"&\"/g' |
|
echo '}' |
|
} |
|
|
|
make_graphviz "$@" |
|
|
|
|