Giter Site home page Giter Site logo

ogl's Introduction

Build Status

Ogl

The prettiest git log graph in town!

Demo

Why

We all love the terminal. git log --graph is cool, but it can get really hard to read.

Installation

The easiest way is to get the single binary (available in releases page).

Install with a single command:

On Linux

$ sudo curl -sL https://github.com/onilton/ogl/releases/download/v0.0.2/ogl-linux.tar | tar x -C /usr/local/bin/

Or with wget:

$ sudo wget -qO- https://github.com/onilton/ogl/releases/download/v0.0.2/ogl-linux.tar | tar x -C /usr/local/bin/

On MacOS

$ curl -sL https://github.com/onilton/ogl/releases/download/v0.0.2/ogl-macos.tar | tar x -C /usr/local/bin/

Or with wget:

$ wget -qO- https://github.com/onilton/ogl/releases/download/v0.0.2/ogl-macos.tar | tar x -C /usr/local/bin/

Config file

You can change some settings like colors in ~/.ogl. An example config:

####################                                                                                                                                                     
#Example Config
#################### 

# Seed is used to get a random color. We usually use the color from
# git log --graph itself but sometimes a color isn't provided so
# we need to choose a random color
#seed=3

# The graph/line style: "squared" "dual" "heavy" "default" (or "rounded")
style=rounded

# This fixes some column sizes. 
#unlimited-fields=false 
#subject.width=60
#author.width=15
#date.width=15

# Field colors
#subject.color=15
#author.color=66
#date.color=237

# Hide consecutive date and author
#hide-consecutive=true

# Align commit messages
#align-messages=false

# Number of columns to give up aligning commits
# When graph is too wide it can get hard to read commits
# even in pieces where it is not that wide yet
#max-align-messages=70

# Enable unicode icons for branch/ref names
#unicode-icons=true

# Personalize branch/ref icons
#icon.origin="🐱  "
#icon.tag="⚑ "
#icon.local="⌨  "
#icon.head="✓"

# Customize commit bullet 
#icon.commit.bullet="◦"
#icon.commit.childless="◦"

TO-DO

  • This was made as proof of concept, so the code needs a lot of love to become prettier
  • More customizations
  • Use other libs when they become available to scala-native
  • Tests!!
  • Packaging?
  • It is fast. But if possible, make it (even) faster
  • Not tested in Mac OS X yet. #4 Thanks @justinpitts !

Questions

  • Why scala? - Because I like it! :) To be honest I started with a prototype in python, but after facing some performance issues, and trying a little bit with cython, I decided to try scala-native.
  • Wow, that scala code is ugly! - Unfortunately, idiomatic scala code is not that fast, and I tried to do that best possible to keep the time down. If you know how to improve the code without affecting performance, send a PR! :)

ogl's People

Contributors

onilton avatar aint avatar jyu-oracle avatar karelcemus avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.