Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 8b67ef8

Browse files
committed
add --shape option
1 parent e67c071 commit 8b67ef8

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

‎git-dot‎

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,11 @@ def git(*args):
2727
@click.option('--remote/--no-remote', '-R', 'flag_remote')
2828
@click.option('--tags/--no-tags', '-t', 'flag_tags')
2929
@click.option('--rankdir', default='TB')
30+
@click.option('--shape')
3031
def main(output, render, view, format, flag_remote, flag_tags,
3132
rankdir, use_message, gather, shortref_len,
32-
exclude_remote, exclude_tag, exclude_branch):
33+
exclude_remote, exclude_tag, exclude_branch,
34+
shape):
3335

3436
def _shortref(ref):
3537
return ref[:shortref_len]
@@ -39,9 +41,12 @@ def main(output, render, view, format, flag_remote, flag_tags,
3941

4042
seen = set()
4143

44+
if shape is None:
45+
shape = 'box' if use_message else 'circle'
46+
4247
graph = Digraph(name='git', format='svg',
4348
graph_attr=dict(rankdir=rankdir),
44-
node_attr=dict(shape='circle'),
49+
node_attr=dict(shape=shape),
4550
)
4651

4752
# subgraph for local branch heads

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /