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

FR: make log graph play well with oneline templates #1358

Open
avamsi opened this issue Mar 11, 2023 · 4 comments
Open

FR: make log graph play well with oneline templates #1358

avamsi opened this issue Mar 11, 2023 · 4 comments
Labels
enhancement New feature or request

Comments

@avamsi
Copy link
Collaborator

avamsi commented Mar 11, 2023

With more or less the default template --

@  zn avamsi 15 seconds ago d8
│  (empty) (no description set)
o  r avamsi 15 seconds ago 8
│  (empty) test3
│ o  ur avamsi 34 seconds ago d1
├─╯  (empty) test2
o  uu avamsi 37 seconds ago e
│  (empty) test1
o  zz 53 years ago 00
   (empty) (no description set)

With a oneline template I'm experimenting with --

@  d8 | (empty) (no description set) | zn
o  8 | (empty) test3 | r
│ o  d1 | (empty) test2 | ur
├─╯
o  e | (empty) test1 | uu
o  00 | (empty) (no description set) | zz
  1. Adjacent changes should be connected (maybe users could replace o with ├─o or something?).
  2. Branch connector shouldn't waste a whole line (like with d1 in this example).

I imagine 2 might be a bit more involved given it might require changes in the graph rendering code to not use another line and not just the connector (maybe ├─o again instead of ├─╯).

@martinvonz
Copy link
Owner

Let's say the graph initially looked like this instead:

@  zn avamsi 15 seconds ago d8
│  (empty) (no description set)
│ o  ur avamsi 34 seconds ago d1
| |  (empty) test2
o | r avamsi 15 seconds ago 8
│ |  (empty) test3
├─╯
o  uu avamsi 37 seconds ago e
│  (empty) test1
o  zz 53 years ago 00
   (empty) (no description set)

Then we can't simply replace the o by ├─o for commit r because there's not enough room. We could possibly use just ├o. Either way, however, I think that makes it look like it's not an ancestor of commit zn. So unless we find a unicode character that's a vertical line with a circle (or other symbol) on it, I think it will be misleading.

I don't think I would mind your suggestion 2, however.

@avamsi
Copy link
Collaborator Author

avamsi commented Mar 11, 2023

Either way, however, I think that makes it look like it's not an ancestor of commit zn.

Good point, sorry I didn't think of that -- of course, we could keep indenting child commits (now that I think of it, I think that's what Fig tree used to do -- and probably still does but I wouldn't know 😅) but that's not ideal.

#242 (and probably #1036) are relevant for the room issue (as you already know, but linking for posterity).

@joyously
Copy link

It all looks like gobbledygook to me, especially since the o is part of the range for the reverse alphabet IDs.
Is everything below @ an ancestor of it? Is there a flag to show @ last?

@martinvonz
Copy link
Owner

It all looks like gobbledygook to me, especially since the o is part of the range for the reverse alphabet IDs.

We could change to some other symbol. I sent #1359 to change to . Please comment on that PR if you have a different preference.

Is everything below @ an ancestor of it? Is there a flag to show @ last?

Yes, --reversed.

avamsi added a commit to avamsi/dotfiles that referenced this issue Mar 23, 2023
@PhilipMetzger PhilipMetzger added the enhancement New feature or request label Jan 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants