takaaki-kasai / git-foresta

git-foresta: Text-based git log graph viewer
GNU General Public License v3.0
222 stars 11 forks source link

Table format #9

Open paullaffitte opened 3 months ago

paullaffitte commented 3 months ago

It would be very nice to be able to display the graph in a table format like they did here : https://stackoverflow.com/a/61487052/5677103.

It makes it way more readable.

Thanks for this awesome tool by the way!

PS: I may find time to implement this feature, would you be open to a PR if it was the case?

TamaMcGlinn commented 3 months ago

I don't know if you realise this code hasn't been touched in many years. A few years ago I did some digging and found lots of different forks of git-foresta; some of them done properly and some copy-pasta, and rebased everything into one fork here - see the readme for an explanation of that work. If you open issues on that it has some chance of getting added, and my fork is certainly open to PRs. I have tried in various ways to contact the original authors, but to no avail unfortunately.

I use foresta in flog, to view a git log inside (neo)vim. Then there's flog-menu and other flog plugins, packaged together as floggit; a full visual git editor that works over SSH.

I'm curious, do you use git-foresta directly on the commandline, or as part of something else?

paullaffitte commented 3 months ago

Indeed, I didn't even realize that ! 😅

I use it in the command line as well as in lazygit:

git:
  branchLogCmd:      git-foresta --date-order {{branchName}}
  allBranchesLogCmd: git-foresta-with-stashes --all --date-order

git-foresta-with-stashes is a bash script:

#!/bin/bash

git-foresta "$@" $(git reflog show --format="%h" stash)

I use foresta in flog, to view a git log inside (neo)vim

In #10 you say the opposite, I'm a bit confused 🤔

Thanks for your answer, I will check those projects.

TamaMcGlinn commented 3 months ago

An equivalent of foresta in embedded in flog. That's what I meant. It used to actually execute foresta and then parse the results, but it was faster to execute vimscript directly rather than doing a system call.