mkchoi212 / fac Goto Github PK
View Code? Open in Web Editor NEWEasy-to-use CUI for fixing git conflicts
License: MIT License
Easy-to-use CUI for fixing git conflicts
License: MIT License
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!
dep has been archived since 2020 and deprecated in favor of Go modules. Would be great to transition this project to Go modules in case it is still maintained.
When I'm editing python files (haven't tested with other filetypes), I notice I don't get syntax highlighting.
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
[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
Hi,
It'd be nice to remove emojis from messages, as they are not supported by all terminals and just litter the terminal.
The controls are all about navigating... nothing about actually fixing the conflict.
Hi,
Thanks for the project, looks really nice and I'd really want to try it! But for now, I can't get to build it...
I barely now anything about go, so if you need more information just tell me what you need:
go version go1.8.3 gccgo (GCC) 7.2.1 20171224 linux/amd64
stderr: https://gist.github.com/Aethelflaed/d813e7bd535ea27fe460c4f6fa4a9567
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 !
The key controls are single characters. It would be nice if actions immediately triggered after pressing the keys, without hitting enter key.
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.
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?
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.
==> 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.```
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
By default, it's not showing any lines unless I press "w" or "s"
When a conflict is accidentally resolved (such a pressing a
twice), there is no way to get back to it with p
and reedit.
Add shortcut b
for selecting both incoming changes.
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.
What about e
to edit or o
to open .
In case I manually want to merge the conflict
dep is a prototype dependency management tool for Go. It requires Go 1.9 or newer to compile. dep is safe for production use.
Seems cool and should help cut down the size of the repo
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.
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.
The |||||
marker isn't removed when the conflict is resolved and ends up in the codebase.
Trying this with a win10 machine, and it only prints the \x1b[32;1m version on cmd.exe shell (works with Powershell though).
e.g.
�[32;1mNo conflicts detected 🎉�[0m
Suggestion would be using some other packages like https://github.com/sirupsen/logrus, https://github.com/mattn/go-colorable or https://github.com/fatih/color.
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
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.