Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Illustrate --revision argument variations using Git diagrams #326

Open
1 task
akaihola opened this issue Mar 10, 2022 · 2 comments
Open
1 task

Illustrate --revision argument variations using Git diagrams #326

akaihola opened this issue Mar 10, 2022 · 2 comments
Labels
documentation Improvements or additions to documentation
Milestone

Comments

@akaihola
Copy link
Owner

akaihola commented Mar 10, 2022

The -r/--revision argument has a number of features which are not intuitively easy to understand, including at least:

  • double dots (rev1..rev2)
  • triple dots (rev1...rev2)
  • omitting the dots (rev2)
  • omitting rev1 (..rev2 and ...rev2)
  • omitting rev2 (rev1.. and rev1...)
  • explicit worktree (e.g. rev1...:WORKTREE:)
  • implicit HEAD (e.g. rev1...HEAD)
  • pre-commit mode (:PRE-COMMIT:)
  • default value
  • ignored when run in a non-Git-repository directory

While the features are explained in the documentation, they would be much better communicated by using Git history diagrams along with the explanations – or perhaps common use cases and corresponding Git diagrams in a table.

GitHub supports Mermaid, and Mermaid does have experimental support for Git graphs:
image
image

Not sure if this particular Mermaid feature is supported in GitHub yet, though. It is. See comment below.

On the other hand, Mermaid doesn't probably render as easily on PyPI, or might turn out to generate less than satisfactory output. And we do have a plan to convert the README to proper Sphinx based documentation and publish it e.g. on Read the Docs (see #78), and for that there's sphinxcontrib-mermaid.

  • Once Git diagrams have been added, make sure Graylint documentation uses them too.
@akaihola akaihola added the documentation Improvements or additions to documentation label Mar 10, 2022
@akaihola akaihola added this to the 1.5.0 milestone Mar 10, 2022
@akaihola
Copy link
Owner Author

akaihola commented Mar 20, 2022

Moving this later.

@akaihola akaihola modified the milestones: 1.5.0, 1.6.0 Mar 20, 2022
@akaihola akaihola modified the milestones: 1.6.0, 1.6.1 Dec 19, 2022
@akaihola
Copy link
Owner Author

Seems that gitGraph works in GitHub (see e.g. mermaid-js documentation) even though it is still experimental.

So we could in fact go forward with this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
Development

No branches or pull requests

1 participant