GithubHelp home page GithubHelp logo

mkchoi212 / fac Goto Github PK

View Code? Open in Web Editor NEW
1.8K 32.0 51.0 1.46 MB

Easy-to-use CUI for fixing git conflicts

License: MIT License

Go 91.60% Ruby 0.57% Shell 1.99% Roff 5.85%
go golang git cui conflict-resolution utility command-line

fac's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

fac's Issues

Support for fixing conflicts outside Git repositories

I use yadm to manage my dotfiles, and occasionally get merge conflicts, which are moderately annoying to clean up. Is there any chance that fac could be made to support fixing conflicts in any given file, not just those in a Git repository?

panic: runtime error: slice bounds out of range [1:0]

I tried to rebase https://github.com/terraform-providers/terraform-provider-github/pull/96 on top of https://github.com/terraform-providers/terraform-provider-github/pull/108/files and got this.

First I tried to see the result of previous conflict resolution using [p], but it looked like result was not saved (I use e and a for each change). I edited conflict again, and then the green line appeared at the bottom. I edited one or more conflict before the crash happened.


┌─c2463a8d064e5b683571835fea1bb9580ef9cebc  (Incoming Version)──────────────────────────────────────────────────────────────────────────│✔ github/resource_github_reposi│
│func resourceGithubTeamMembershipRead(d *schema.ResourceData, meta interface{}) error {                                                │✔ github/resource_github_reposi│
│ client := meta.(*Owner).client                                                                                                        │✔ github/resource_github_reposi│
│ t, n := parseTwoPartID(d.Id())                                                                                                        │✔ github/resource_github_reposi│
│>>>>>>> c2463a8d064e5b683571835fea1bb9580ef9cebc                                                                                       │✔ github/resource_github_reposi│
│                                                                                                                                       │-> 20. github/resource_github_t│
│                                                                                                                                       │21. github/resource_github_team│
│                                                                                                                                       │22. github/resource_github_team│
│                                                                                                                                       │23. github/resource_github_team│
│                                                                                                                                       │✔ github/resource_github_team_r│
│                                                                                                                                       │                               │
│                                                                                                                                       │                               │
│                                                                                                                                       │                               │
│                                                                                                                                       │                               │
│                                                                                                                                       │                               │
│                                                                                                                                       │                               │
└───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────└───────────────────────────────┘
 [w,a,s,d,e,?] >> panic: runtime error: slice bounds out of range [1:0]

goroutine 274 [running]:
github.com/nsf/termbox-go.PollEvent(0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
	/home/anatoli/go/src/github.com/nsf/termbox-go/api.go:356 +0x905
github.com/jroimartin/gocui.(*Gui).MainLoop.func1(0xc0000fc480)
	/home/anatoli/go/src/github.com/jroimartin/gocui/gui.go:354 +0x30
created by github.com/jroimartin/gocui.(*Gui).MainLoop
	/home/anatoli/go/src/github.com/jroimartin/gocui/gui.go:352 +0x57

Status

Hello, just curious what the status of the project? I was just reviewing the commit history, and suspect activity may be lower simply due to the narrower scope and being feature complete. But wanted to confirm.

Thank you

Crash while resolving large number of conflicts

 [w,a,s,d,e,?] >> panic: runtime error: slice bounds out of range

goroutine 337 [running]:
github.com/nsf/termbox-go.PollEvent(0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
        /Users/else/go/src/github.com/nsf/termbox-go/api.go:348 +0x8d4
github.com/jroimartin/gocui.(*Gui).MainLoop.func1(0xc00020a090)
        /Users/else/go/src/github.com/jroimartin/gocui/gui.go:354 +0x30
created by github.com/jroimartin/gocui.(*Gui).MainLoop
        /Users/else/go/src/github.com/jroimartin/gocui/gui.go:352 +0x6e
$ fac -v
fac 2.0

Long filenames hide the current file marker

Long filenames could hide the marker of the current file. It could be moved to the left and/or different colour for the active file could be used.

Since filenames are truncated in the sidebar, the full path and filename of the active file could be shown at the top of the main window.

Paths don't resolve correctly when starting fac from sub directory

fac seems to have trouble resolving paths when I start it from anything other than the repositories root directory. In the example below, fac-test is the repository root and file.md is a conflicted file in the sub-dir folder.

bildschirmfoto vom 2018-01-28 15-21-04

Anyway, thanks for this tool. I'm looking forward to upcoming features 😁

brew installation issue

==> Downloading https://github.com/mkchoi212/fac/releases/download/v1.0.1/fac_1.
==> Downloading from https://github-production-release-asset-2e65be.s3.amazonaws
######################################################################## 100.0%
Error: SHA256 mismatch
Expected: ea28679d1246c9c75047eae4c4d1ce3705e5bb42458dabe8faea9861aea6f441
Actual: 74e28c0400a71e4cc2bf3f0b54a74d3e98cdcedb048b36445fbf55d42fa7c8ca
Archive: /Users/achikin/Library/Caches/Homebrew/fac-1.0.1.tar.gz
To retry an incomplete download, remove the file above.```

Long list of conflicts hide the help

When you have a long list of conflicts, the help text with the keyboard shortcuts is hidden.

Git has often this notion of selecting ? for showing help with an explanation for the choices.

Perhaps you could mimic what Git does in interactive tools on the command line and list all the possible keys on the command prompt with a question mark ? at the end. If the question mark is selected it would print the keys meaning somewhere.

cannot execute binary file: Exec format error

Hello,

Yesterday i installed your software on MacOS and it worked well, but today i have this error when i tried to execute the binary :
bash: /home/linuxbrew/.linuxbrew/bin/fac: cannot execute binary file: Exec format error

What is the problem ?
My uname is :
Linux 4.10.0-38-generic #42~16.04.1-Ubuntu SMP Tue Oct 10 16:32:20 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

I did not have yet a conflict, but next time i will try FAC ! :)
Thank you for your work.

brew tap command doesn't find any formulae

The fac.rb file needs to be in a Formula directory at the root of the repository.

After I ran the brew tap command, cd'd into /usr/local/Homebrew/Library/Taps/mkchoi212/homebrew-fac and mv assets Formula the brew install fac command found the formula and installed it successfully.

b for both

Add shortcut b for selecting both incoming changes.

Feature Request: Change key binds

Hello,

WASD are a great fit for qwerty keyboards but for people having non qwerty keyboards, they are quite bad actually.
For example on an azerty keyboard, it should be ZQSD.

I was wondering if it would be possible to add a feature to reconfigure key bindings in order to have a better usability on every keyboard layout.

Thank you for this great tool !

Persist view option

If I've opened fac and used v to change the view setting, I would expect this configuration to persist between sessions. It doesn't do that, though.

Support for git-mergetool

Hi! Thanks for this great tool!

I've tried to configure it as a Git mergetool:

git config --global merge.tool fac

However, Git ignores it and it runs vimdiff for me. Previously, I had opendiff configured to start FileMerge and it works. I've also tried various different merge tools like sublimerge and I was expecting this to work tool.

git-mergetool command should start the tool with 3 arguments for each file with conflicts. I understand fac is supposed to be run for the whole set of merge conflicts and not just single files. However, for starters, it could start for the whole set and ignore the arguments passed to it. Later it could automatically move to the file which was passed to it.

Do you think there's a particular reason why git-mergetool would not start fac with the above configuration? I've already checked that fac is in my PATH.

Thanks!

Links comes out as black in terminal

I moved to a new computer, and fetched an updated version of Fac (great piece of software, thank you) -- and notice that the links in the terminal diffs are black (and also invisible on black foreground).

I have solved this by making Ansi black into a dark red in ITerm, but I'm assuming this is a common enough issue, so I cretated this issue.

Invalid number of conflict markers

I have created a repo to test fac. I created a sample file, then I created two branches and made two different changes in that file, than I merged those branches into master, got a conflict and tried to run fac to fix it.
Here is the terminal output(besides the error itself please mention that fac does not add \n after the error message, which makes bash print status message on the same line after fac exit.

~/src/factest (master|MERGING) → ls
somefile
~/src/factest (master|MERGING) → cat somefile
<<<<<<< HEAD
aa
||||||| merged common ancestors
aaaa
=======
dddd
>>>>>>> second
bbbb
cccc
~/src/factest (master|MERGING) → fac
Invalid number of remaining conflict markers~/src/factest (master|MERGING) →
→ git --version
git version 2.15.1

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.