Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linting for possible merge conflicts #260

Open
da-x opened this issue Jul 22, 2020 · 3 comments
Open

Linting for possible merge conflicts #260

da-x opened this issue Jul 22, 2020 · 3 comments
Labels
blocked This issue is blocked by some other issue enhancement

Comments

@da-x
Copy link

da-x commented Jul 22, 2020

Maybe git-interactive-rebase-tool can show errors in case there would be merge errors, even before the user has exited and saved the editor to continue the rebase.

See example in da-x/depree: Vim ALE checker for Git rebase interactive. Initially I wrote this tool for commit dependency detection, but then I fitted it to perform rebase script linting in my editor.

It is written in Rust and also uses libgit2. It's quite fast, does the conflict checking in memory and it does not affect Git state at all.
so should be easy to integrate in. Maybe I can turn depree into a library for git-interactive-rebase-tool to use.

@koreno
Copy link

koreno commented Jul 22, 2020

This would be a killer feature!
It could simply highlight the commits where conflicts arise. A status line could also show which files conflict.

@MitMaro
Copy link
Owner

MitMaro commented Jul 22, 2020

@da-x I think this is a great idea and @koreno 's idea of showing the conflicting files in the diff view is also great!

I am also working on a "diff" view and this could even be expanded to show the conflicting hunks in the diff as well.

@MitMaro MitMaro self-assigned this Jul 22, 2020
@MitMaro MitMaro changed the title Consider linting for possible merge errors Linting for possible merge conflicts Jul 22, 2020
@MitMaro MitMaro removed their assignment Jul 22, 2020
@MitMaro MitMaro added the blocked This issue is blocked by some other issue label Mar 26, 2022
@MitMaro
Copy link
Owner

MitMaro commented Mar 26, 2022

I took a stab as this recently, but the https://github.com/rust-lang/git2-rs library doesn't have a nice way to do this in memory. I am reluctant to make changes to the working directory, or even within .git.

I'm still investigating options, but I am going to put this on the backlog for now, as I add some easier features. I really want this, though!

@MitMaro MitMaro moved this to Backlog in GIRT Project Mar 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked This issue is blocked by some other issue enhancement
Projects
Status: Backlog
Development

No branches or pull requests

3 participants