Skip to content
This repository was archived by the owner on Apr 1, 2020. It is now read-only.

Add git changes indicator to git plugin #1308

Closed
akinsho opened this issue Jan 16, 2018 · 0 comments · Fixed by #1310
Closed

Add git changes indicator to git plugin #1308

akinsho opened this issue Jan 16, 2018 · 0 comments · Fixed by #1310

Comments

@akinsho
Copy link
Member

akinsho commented Jan 16, 2018

Problem/Desired Feature

@bryphe I've noted in apps like vscode or hyperterm, or even vim statusline plugins like airline with fugitive the git plugins include information regarding changes to branch such as deletions and additions, which is quite helpful at a glance to know where you stand

Example (hyper term)

screen shot 2018-01-16 at 17 40 22

I was thinking something simple like a plus for additions, minus for deletions and maybe a similar symbol to the above for changes.

I realise this will require some extra methods on the git service which theres some future plans to refactor or re-implement but would adding those methods and showing that in the git service/plugin as it stands be ok?.

Implementation Ideas

I was thinking this could be approached using an npm package (which is one of the many values of having Oni as a frontend aka access to node libraries)

The package which comes to mind is simpleGit which is a lightweight wrapper around git and a very good jumping off point for loads of git functionality like cloning repos, renaming branches, merges etc.

Potential Issues

The way that vim handles changes in buffers is an area of concern as I've looked at the implementation of plugins like fugitive and gitgutter and one particular area of concern is that whilst editing a buffer if unsaved edits are actually not saved to the same location on disk so these plugins use a series of work arounds for that.

For the scope of what I intend a naive approach would be only reflect changes on save, however the limitation there would be that by going down this route rather than using something like vim-fugitive is that this is a later issue which might be faced although potentially a similar workaround can be implemented at the time if it comes to it

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants