News for hackers. Stuff that matters.
Re:GRV – Git Repository Viewer by jordigh on Wednesday January 31, 2018 @04:47PM (#16277832)
It's slightly funny how alternative git user interfaces are their own cottage industry. It's been like this pretty much since day one:

https://public-inbox.org/git/[email protected]...

In a way, the default git CLI is just the one alternative git interface that "won".

My favourite one is still hg-git, despite its warts.

Re:GRV – Git Repository Viewer by jamesgeck0 on Wednesday January 31, 2018 @06:31PM (#16278540)
When I first started comparing Mercurial and Git, the built-in `hg serve` command that showed a repo view in the browser seemed like a killer feature. Machines running `hg serve` could even be pulled from across the network without any setup.

I mean, git had tools that could do that too, but built-in! Then I discovered GitHub.

Re:GRV – Git Repository Viewer by harlanji on Wednesday January 31, 2018 @07:11PM (#16278743)
Git is the precursor to "block chain" in utility. I was unaware of this cottage industry before now :)
Re:GRV – Git Repository Viewer by kakarot on Wednesday January 31, 2018 @09:00PM (#16279207)
Please explain the relationship between Git and Blockchain technology.
Re:GRV – Git Repository Viewer by lojack on Wednesday January 31, 2018 @09:40PM (#16279320)
Not the person that posted this, but they both use merkle trees as their underlying data structure. In both cases you can’t rewrite the past without rewriting every successive change.
Re:GRV – Git Repository Viewer by __blockcipher__ on Wednesday January 31, 2018 @10:45PM (#16279504)
Merkle trees!
Re:GRV – Git Repository Viewer by knubie on Wednesday January 31, 2018 @04:02PM (#16277518)
This looks really similar to tig (of which I'm a big fan and user). What are the main difference between these two tools?
Re:GRV – Git Repository Viewer by powerage99 on Wednesday January 31, 2018 @05:16PM (#16278049)
GRV is heavily based on tig, and takes a lot of inspiration from it. tig is still far more feature rich than GRV and will be for a while. However there are a couple of features GRV currently has that are nice:

- A simple query language that can be used to filter commits. For example: authordate >= "2017-09-01" AND authordate < "2017-10-01" AND authorname = "John Smith" AND parentcount < 2.

- View layout is more flexible. Each tab in GRV can have any view added to it as a vplit or hsplit. Users can create their own tabs and populate them with any combination of views they want. The long term idea is that when GRV supports more views (tree view, file view, etc) it will be possible to create quite a custom experience.

Re:GRV – Git Repository Viewer by jordigh on Wednesday January 31, 2018 @09:29PM (#16279291)
> A simple query language

Oh, nice, finally someone implemented something like Mercurial revsets for git:

https://www.mercurial-scm.org/repo/hg/help/revsets

I've been hoping that even if nobody ever uses Mercurial, I was hoping at least they would manage to implement some of its better ideas for git.

Re:GRV – Git Repository Viewer by gecko on Wednesday January 31, 2018 @10:35PM (#16279476)
Now they just need filesets and templates and I’ll mostly accept things.
Re:GRV – Git Repository Viewer by 1wd on Thursday February 01, 2018 @01:29AM (#16279970)
I'd also like anonymous branches, phases and obsolescence markers.
Re:GRV – Git Repository Viewer by cies on Wednesday January 31, 2018 @05:31PM (#16278138)
This info deserves to be in the README, additionally as a way to pay respects to tig.
Re:GRV – Git Repository Viewer by acmecorps on Wednesday January 31, 2018 @07:05PM (#16278710)
For some reason, I like the fonts more on grv compared to tig, even though tig has more features.

Any chance that I can do basic stage/unstage/commit etc with grv?

Re:GRV – Git Repository Viewer by laumars on Thursday February 01, 2018 @01:53AM (#16280064)
> For some reason, I like the fonts more on grv compared to tig,

I can't tell if this is a joke comment or not but both tools are run in the terminal so the font would be whatever the terminal uses. What you're doing is essentially comparing the typeface of `sed` verses `awk`

Re:GRV – Git Repository Viewer by andrewla on Wednesday January 31, 2018 @04:19PM (#16277633)
Same here, though I had been watching development of rat [1], which seemed, when it appeared here, to be an interesting generic way of making a suite of commands into a curses-based interface. Seems that development has stalled, though.

[1] https://github.com/ericfreese/rat

Re:GRV – Git Repository Viewer by fanf2 on Wednesday January 31, 2018 @04:36PM (#16277745)
I would also like to see a comparison with magit, the Emacs git UI.
Re:GRV – Git Repository Viewer by kaushalmodi on Wednesday January 31, 2018 @08:28PM (#16279072)
Magit (Emacs) deserves a mention here: https://magit.vc/. It's the epitome of text based "gui" for any git operation. It's so good that any real Git GUI also doesn't come close.
Re:GRV – Git Repository Viewer by etu on Thursday February 01, 2018 @01:36AM (#16279998)
I can't recommend Magit enough to anyone. Whenever I try people see me as crazy when I tell them what I do with git with a breeze. Things like committing are of course easier and such. But all the other things. Oh man. Magit have entirely changed my understanding of git.
Re:GRV – Git Repository Viewer by gkgicccj on Wednesday January 31, 2018 @10:07PM (#16279398)
Does anybody have a comment on the similar vimagit?
Re:GRV – Git Repository Viewer by floatboth on Thursday February 01, 2018 @05:03AM (#16280666)
(I assume you're talking about this one: https://github.com/jreybert/vimagit)

Yeah it's probably the best way to interactively stage only changes you want to commit (`add --patch`)

Re:GRV – Git Repository Viewer by panzerklein on Thursday February 01, 2018 @03:28AM (#16280377)
Re:GRV – Git Repository Viewer by jwr on Thursday February 01, 2018 @02:57AM (#16280275)
This is just as good a place to write this as any:

There is a use case which seems to be missed by all git-related tools: Reading Code on Github.

I would really like to have a tool that would allow me to easily browse my starred repos on GitHub, on my iPad, in offline mode (one-click update of all repos please). And by "browse" I mean read code, so the main focus is not on tags/branches, but viewing files and changesets.

There are plenty of tools that try to let you edit code, access repos, browse tags/branches, but they all assume that you are willing to spend time manually cloning/syncing/resyncing/downloading/uploading repos. This quickly gets tedious (Textastic on iPad is a good example).

Reading code is important, and it seems to have been forgotten.

Re:GRV – Git Repository Viewer by dufferzafar on Tuesday February 06, 2018 @12:47PM (#16317903)
> Reading code is important, and it seems to have been forgotten.

I know right!

I also like to do all my reading on a Tab (Android) - be it books or code. My current approach to reading code is to first convert all the files to PDF! (I wrote a script uses LaTeX etc. to do this) and then sync all the files to my Tab.

It's okay for code that isn't changing frequently and PDFs also have annotations etc, which I use.

Re:GRV – Git Repository Viewer by lucideer on Thursday February 01, 2018 @03:38AM (#16280408)
I'm not sure if I understand what you're asking, and as an Android user I don't have any direct experience of this on iOS, but I presume you're just looking for a good Git client for iPad?

> spend time manually cloning/syncing/resyncing/downloading/uploading repos. This quickly gets tedious

These should all take little-or-no-time and be far from tedious in any half-decent Git client. Have you tried Working Copy? (I haven't but it seems competent from reviews)

Re:GRV – Git Repository Viewer by jwr on Friday February 02, 2018 @08:28AM (#16290337)
Ideally, I'm looking for a github client for ipad (or whatever, at this point I'd be willing to buy an Android tablet just for that) that is designed for reading code that is on GitHub.

Yes, I have Working Copy. I also have several other applications that are in various ways related to git and github, but do not solve the problem.

Re:GRV – Git Repository Viewer by jeremiahwv on Wednesday January 31, 2018 @04:11PM (#16277576)
ncurses seems powerful. Any good suggestions on a tutorial or introduction to ncurses (which it appears is what was used for the ui here)? Ideally for python, or generalized... Or is there a better tool to learn for generic command line UIs?
Re:GRV – Git Repository Viewer by _sdegutis on Wednesday January 31, 2018 @04:48PM (#16277840)
Kilo is a great way to learn how to manipulate the terminal directly (rather than using a wrapper library like ncurses): https://github.com/antirez/kilo (A text editor in less than 1000 LOC with syntax highlight and search.)
Re:GRV – Git Repository Viewer by stevekemp on Thursday February 01, 2018 @12:25AM (#16279791)
There are many forks of this, which I think is a testament to how simple, clean, and easy to modify this code was.

The initial blog-post which announced the editor is worth a read, as is the discussion here:

http://antirez.com/news/108

https://news.ycombinator.com/item?id=12065217

My own version adds Lua support, multiple buffers, and similar features. It is by no means the best of the editors but I had fun playing with it - to the extent I was almost tempted to write an editor. (But then I realized I already have vim for writing email, and emacs for everything else. The world really doesn't need another editor!)

https://github.com/skx/kilua/

Re:GRV – Git Repository Viewer by gkgicccj on Wednesday January 31, 2018 @10:17PM (#16279423)
Member of rust interner task force here. Check out termion, it's so much simpler than raw ncurses.

While you're at it, consider rewriting everything you have in Rust. (obligatory statement as the member of ritf)

PS: the termion suggestion is not a joke

Re:GRV – Git Repository Viewer by TheAceOfHearts on Wednesday January 31, 2018 @08:44PM (#16279139)
If you want to build interactive terminal interfaces, check out blessed [0]. Even better, you can use react-blessed [1] to write declarative UI code! You can also find additional widgets in blessed-contrib [2].

For actually shipping the code around, you could use pkg [3] to generate a single binary. That lets you avoid having to install node or any supporting libraries.

[0] https://github.com/chjj/blessed

[1] https://github.com/Yomguithereal/react-blessed

[2] https://github.com/yaronn/blessed-contrib

[3] https://github.com/zeit/pkg

Re:GRV – Git Repository Viewer by ageofwant on Wednesday January 31, 2018 @07:45PM (#16278899)
Used npyscreen http://npyscreen.readthedocs.io/index.html for a few things. Can recommend.
Re:GRV – Git Repository Viewer by andrecl on Wednesday January 31, 2018 @04:08PM (#16277555)
Would be nice if we could install this using brew
Re:GRV – Git Repository Viewer by michaelmcmillan on Wednesday January 31, 2018 @04:23PM (#16277670)
Writing a formula is pretty straight forward [1]. Just submit a PR to homebrew.

1. https://github.com/Homebrew/brew/blob/master/docs/Formula-Co...

Re:GRV – Git Repository Viewer by elcapitan on Wednesday January 31, 2018 @04:17PM (#16277610)
Looks like a text version of gitx, my favorite tool for that purpose. Will check it out.
Re:GRV – Git Repository Viewer by keyle on Wednesday January 31, 2018 @06:47PM (#16278632)
sadly no mac build, but that lead me to find tig, so thanks for that!
Re:GRV – Git Repository Viewer by eridius on Wednesday January 31, 2018 @04:08PM (#16277552)
This looks pretty cool! Could we please get better package manager support on macOS though? I'd love to see this available in either MacPorts or Nix.
Re:GRV – Git Repository Viewer by michaelmcmillan on Wednesday January 31, 2018 @04:21PM (#16277655)
That looks powerful, nice work!