Git Product home page Git Product logo

rebase-editor's People

Contributors

jnachtigall avatar michaelmior avatar mischah avatar perlun avatar sjurba avatar turbo87 avatar

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

rebase-editor's Issues

Doesn't work with git-bash on windows

I can't get stdin.setRawMode(true) to work with Mingw which is the terminal used in Git-bash included with git on windows.

Any help, suggestions or workarounds on this issue are very welcome.

Have you found a way to use rebase-editor to work on windows with another terminal? Please let me know here.

Syntax coloring

When editing a interactive rebase with vim you get nice colors:

In comparison, rebase-editor looks more plain

It would be nice if rebase-editor would highlight the command and the commit sha1 in a different color, to make the list more readable

-c doesn't work when it's the last option

When -c is the last option and there are no colors specified, the argument parsing gets confused.

$ GIT_SEQUENCE_EDITOR="rebase-editor -c" git rebase -i master
No input file specified.
Could not execute editor

These cases work as expected.

$ GIT_SEQUENCE_EDITOR="rebase-editor -c -s" git rebase -i master
$ GIT_SEQUENCE_EDITOR="rebase-editor -c ^r,^y,^b" git rebase -i master

Can I merge a `--marker` style into `--color` styles ?

My current configuration is below:

editor = rebase-editor -c "^M,^G,^g" -m "^#^Y"

and the result is as this image:

image

But I want the marker style to be merged into color styles, that is, it is desirable that text colors of marked texts should be bright magenta, bright green and green and their foreground colors should be yellow at the same time, as below:

image

Can I do that? Or I request this specification.

CTRL-Down, CTRL-Up, SHIFT-Down, SHIFT-Up doesn't work on Mac

When capturing with stdin.setRawMode(true) it doesn't return anything for those keys on Mac.

If you want to see for your self, configure rebase-editor -s to get a status bar on top that show exactly what keys are pressed..

Any help or suggestions on this issue are very welcome.

In the mean time we have to settle with using Left and Right..

Can't use rebase-editor with Intellij IDEA

When using editor-config it's not possible to use the Reword or Interactive Rebase from IDEA any more. On the console there is following error:

git -c core.quotepath=false -c log.showSignature=false -c core.commentChar=� rebase --interactive --rebase-merges --no-autosquash 2a1...987
Not a proper rebase file: 
label onto
reset onto
pick 8a4de21 <message>
pick 41d0918 <message>
 ...
error: There was a problem with the editor 'rebase-editor'.

Is there any chance this could be fixed?

Syntax Error in Node 6.13.0

Running Node 6.13.0 on ubuntu 18.04, got the following error:

node_modules/rebase-editor/node_modules/string-kit/lib/format.js:624
                base = round( n / ( 1000 ** logDiv3 ) , roundStep[ logMod ] ) ;

SyntaxError: Unexpected token *

Since node 6 is officially supported, I think this is a bug.

starting editor fails with TypeError: Buffer.allocUnsafe is not a function

I've installed rebase-editor on Linux Mint 18 Sarah by typing:

sudo apt-get install npm
sudo npm install -g rebase-editor
git config --global sequence.editor rebase-editor

When I run interactive rebase I receive following error:

/usr/bin/env: ‘node’: No such file or directory
Could not execute editor

I fixed that by runing (as suggested on some forum)

ln -s /usr/bin/nodejs /usr/bin/node

And now I got:

~/source/hardware $ git ireb HEAD^^^^^^^^^^
/usr/local/lib/node_modules/rebase-editor/node_modules/terminal-kit/lib/ScreenBuffer.js:1495
ScreenBuffer.prototype.CLEAR_BUFFER = Buffer.allocUnsafe( ScreenBuffer.prototype.ITEM_SIZE ) ;
                                             ^

TypeError: Buffer.allocUnsafe is not a function
    at Object.<anonymous> (/usr/local/lib/node_modules/rebase-editor/node_modules/terminal-kit/lib/ScreenBuffer.js:1495:46)
    at Module._compile (module.js:410:26)
    at Object.Module._extensions..js (module.js:417:10)
    at Module.load (module.js:344:32)
    at Function.Module._load (module.js:301:12)
    at Module.require (module.js:354:17)
    at require (internal/module.js:12:17)
    at Object.<anonymous> (/usr/local/lib/node_modules/rebase-editor/node_modules/terminal-kit/lib/termkit.js:48:24)
    at Module._compile (module.js:410:26)
    at Object.Module._extensions..js (module.js:417:10)
Could not execute editor

How should I proceed?

Feature Request: No Option to use -c or -C flag with "fixup" command

From the interactive rebase commands:

# f, fixup [-C | -c] <commit> = like "squash" but keep only the previous
#                    commit's log message, unless -C is used, in which case
#                    keep only this commit's message; -c is same as -C but
#                    opens the editor

Currently, there is no option/keybind to allow us to choose one of these flags when we are using fixup. Will look into creating a keybind for the fixup command, I.e. CRTL-F -> fixup -c and SHIFT-f -> fixup -C

--color not working

I've tried to use color mode using this:

$ git config --global sequence.editor "rebase-editor -c"

but afterwards rebase doesn't work anymore:

$ git rebase -i upstream/master
No input file specified.
Could not execute editor

Add syntax highlighting

Just a suggestion that syntax highlighting would be nice. vim normally does this for me and it's the one thing I'm missing after trying rebase-editor. I may try to hack together a PR myself with some simple colours.

No scrolling for long commit lists

When I run a large rebase operation with a long list of commits I can't edit the commits at the bottom since the editor doesn't seem to support scrolling at the moment.

rebase-editor is not visible in ConEmu

  1. Install ConEmu
  2. Run git bash in it
  3. Do rebase
  4. Empty terminal will be shown, no errors, but no text neither. If you press Enter, it will say "nothing to do"..

Also tried with -c and with --no-alternate-screen options - it didn't help.

Custom Keybindings Fail

For some reason, the JSON file with keybindings is not being parsed properly. Here's the error message:

$ git rebase --interactive 05ce24982865b1fbedc9f3076cfe4960a0482b5f
/Users/brandon/.rebase:2
  "j": "down",
     ^
SyntaxError: Unexpected token :
    at Object.exports.runInThisContext (vm.js:76:16)
    at Module._compile (module.js:528:28)
    at Object.Module._extensions..js (module.js:565:10)
    at Module.load (module.js:473:32)
    at tryModuleLoad (module.js:432:12)
    at Function.Module._load (module.js:424:3)
    at Module.require (module.js:483:17)
    at require (internal/module.js:20:19)
    at module.exports (/Users/brandon/.config/yarn/global/node_modules/rebase-editor/lib/key-bindings.js:6:18)
    at module.exports (/Users/brandon/.config/yarn/global/node_modules/rebase-editor/lib/main.js:17:18)
Could not execute editor

This happens whether I list only my own keybindings, or only the defaults, or both.

Here's the relevant line in my .gitconfig:

editor = rebase-editor --status --color --marker '^Y' --keys ~/.rebase

And here is my ~/.rebase file:

{
  "j": "down",
  "k": "up"
}

FR: Implement `break`, `label`, `reset` and `merge`.

These are all the commands available when rebasing (in German):

Befehle:
# p, pick <Commit> = Commit verwenden
# r, reword <Commit> = Commit verwenden, aber Commit-Beschreibung bearbeiten
# e, edit <Commit> = Commit verwenden, aber zum Nachbessern anhalten
# s, squash <Commit> = Commit verwenden, aber mit vorherigem Commit vereinen
# f, fixup <Commit> = wie "squash", aber diese Commit-Beschreibung verwerfen
# x, exec <Commit> = Befehl (Rest der Zeile) mittels Shell ausführen
# b, break = hier anhalten (Rebase später mit 'git rebase --continue' fortsetzen)
# d, drop <Commit> = Commit entfernen
# l, label <Label> = aktuellen HEAD mit Label versehen
# t, reset <Label> = HEAD zu einem Label umsetzen
# m, merge [-C <Commit> | -c <Commit>] <Label> [# <eineZeile>]
# .       Merge-Commit mit der originalen Merge-Commit-Beschreibung erstellen
# .       (oder die eine Zeile, wenn keine originale Merge-Commit-Beschreibung
# .       spezifiziert ist). Benutzen Sie -c <Commit> zum Bearbeiten der
# .       Commit-Beschreibung.

The b, l, t and m keys do not do anything.

Tasks

  • break
  • label
  • reset
  • merge
  • exec

Cannot open rebase-editor

git rebase -i HEAD~2
hint: Waiting for your editor to close the file... /usr/local/lib/node_modules/rebase-editor/lib/reducer.js:148
  return state.lines[pos]?.action
                          ^

SyntaxError: Unexpected token '.'
    at wrapSafe (internal/modules/cjs/loader.js:915:16)
    at Module._compile (internal/modules/cjs/loader.js:963:27)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
    at Module.load (internal/modules/cjs/loader.js:863:32)
    at Function.Module._load (internal/modules/cjs/loader.js:708:14)
    at Module.require (internal/modules/cjs/loader.js:887:19)
    at require (internal/modules/cjs/helpers.js:74:18)
    at Object.<anonymous> (/usr/local/lib/node_modules/rebase-editor/lib/main.js:3:12)
    at Module._compile (internal/modules/cjs/loader.js:999:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
error: There was a problem with the editor 'rebase-editor'.

return state.lines[pos]?.action

I could edit by vim.

image

Apparently alternate screen is evil - Add config to disable it

Apparently, lots of people find the alternate screen to be evil. I have no problem with it but since some do, I figured we might as well add a switch to disable it.

You might argue that you shouldn't need to configure the app specifically for this, that I should respect some global term config and figure it out on my own. But, ain't got time for that shit. But maybe terminal-kit does, so if you want that fixed, take it up with him. I think that titeInhibit will work, what ever that means.

But a simple switch to disable it from my app, that I can do:
--no-alternate-screen

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.