Giter VIP home page Giter VIP logo

git-file-history-explorer's Introduction

git-file-history-explorer

A simple viewer to see how a file has changed from commit to commit.

app_image.png

Run

Currently, the project needs to be built directly with the following steps:

  • Install Go v1.21
  • clone this repo
  • run make or manually build the project with CGO_ENABLED=1 go build -o bin/asgit-file-history-explorer
  • place git-file-history-explorer in your PATH, or you'll need to run it using a full (or relative) path

Once a stable version 1.0.0 is reached, compiled versions will be available for each release.

Development

Report Bug or Feature Request

To report a bug or make a feature request, please open a GitHub issue

Please provide the proper Label: bug, enhancement, etc.

Contribute

Merge/Pull requests are welcome.

Please follow these steps:

  • clone the repo
  • create a branch for your work
  • create a GitHub issue with the following
    • Assign it to yourself
    • Provide proper labels (i.e. enhancement, documentation, bug, etc)
    • Provide a short but descriptive Title
    • Provide a link to your branch in the comments

Tasks will be monitored and any comments/questions should be replied to within a day or two.

CGO_ENABLED

To run or build, the CGO_ENABLED flag needs to be set.

export CGO_ENABLED=1
go run main.go filename_to_view
CGO_ENABLED=1 go run main.go filename_to_view

Known Bugs

  • while selecting different commits, the file will not render
    • fix: simply change the size of the window

git-file-history-explorer's People

Contributors

skeletonkey avatar

Watchers

 avatar

git-file-history-explorer's Issues

Load the commits in the background

Currently, all logs for a file are processed at start-up. This will probably lead to longer startup time on files with many commits.

Use git log -n 5 to get the first 5 logs and process the rest in the background.
See https://www.git-scm.com/docs/git-log#_commit_limiting for more parameters.

Five is used in the above command as an example. Some testing should be done to see how many log entries can be processed before a delay is noticed.

List widget appears to limit length of text

Currently, it appears that the List widget (

listWidget := widget.NewList(
) only allows 35 characters before wrapping them. When the text wraps there is no line break and it looks terrible:
image
35 characters feels too short for the labels. I wish to display more than 35 characters without wrapping.

  • investigate List widget to see why the label limit appears to be 35
  • see if that can be changed
  • if not see if there is a different widget that should be used for the list
  • if there's nothing to be done add a comment to the code about the situations

Bonus:
Explore opening up a ticket with the Fyne project to discuss the reason for the limit.

Provide a sensible opening window size

The window opens up vertically minimized and the width of its current contents.

The window should have a suitable horizontal and vertical size - enabling scroll bars when needed.

This may also cause the rendering issue when switching between commits.

Enable diff between commits

There should be a way to all the selection of two commits and show the diff between them. This will be the output of the following git command:

$ git diff HEAD^^ HEAD main.c
$ git diff HEAD^^..HEAD -- main.c
$ git diff HEAD~2 HEAD -- main.c

Show diffs

Currently, the tool shows the state of the file at that commit. It would be helpful to have a toggle button showing the change from the previous commit to the current one.

The first commit would show the file itself since nothing existed before that commit.

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.