Coder Social home page Coder Social logo

small-tech / gnomit Goto Github PK

View Code? Open in Web Editor NEW
30.0 30.0 2.0 504 KB

A simple Git commit message editor for Gnome.

License: GNU General Public License v3.0

JavaScript 74.68% Python 1.88% Meson 7.49% Shell 15.94%
commit editor flatpak git gjs gnome gtk

gnomit's People

Contributors

aral avatar sonnyp 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

gnomit's Issues

Colorize "changes to be commited"

It would be great to have these colored in a way the usual status messages with $ git status are colored (if you have some good zsh plugins or so).

So orange for "modified", red for "removed" and green for "added".

The use case is just that I can have an overview of what I am committing just to verify it again (I often just automatically do git add .&& git commit -a so I do not check-in manually) and re-check that I am not doing bad stuff. ๐Ÿ˜‰
I guess this use case is what git devs had in mind when adding this to commit messages, so you may just colorize it, so I see it better (the grey is really light) and it strikes me if I am about to commit a wrong file.

Pay attention to the fact that the text is localized in different languages in git.

install option does not work

The install feature tries to do the following:

git config --global core.editor '/app/bin/ind.ie.Gnomit'

/app/bin/ind.ie.Gnomit is only a path in the sandbox and git config ... would only work on the host

Maybe it works when the flatpak isn't sandboxed? (Did not try)

Not sure what the intention was. I can submit a PR to fix

Hg support

Hey Aral. I've started to use Gnomit (the pure gjs version from the bare branch) for my work with Git since I moved over the Linux a few weeks ago and really like it.

I also use Mercurial for some of my work/projects and tried to hook Gnomit into hg command line as my default editor. That in general works but there are a few quirks re the installation for instance, or specifics of the git format (like expecting a .git directory and a certain text to determine the branch etc).

I've monkey-patched some of them locally for myself, but I was wondering what your vision for Gnomit is moving forward. I'd be happy to try to implement my fix properly so that Gnomit could be used for both git and hg if you're open to that. Or alternatively if you wanted to keep it git only, I could fork and try to create a separate Mercurial version. Anyway, keen to have a chat.

Appstream file validation fails on 2.0.0

Hello,

tests are failing with:

--- command ---
11:20:56 /usr/bin/appstream-util validate data/org.small_tech.Gnomit.appdata.xml
--- stdout ---
data/org.small_tech.Gnomit.appdata.xml: FAILED:
โ€ข attribute-invalid     : <screenshot> width too large [https://ar.al/2018/10/19/gnomit-1.0.4/gnomit.png] maximum is 1600px
--- stderr ---
Validation of files failed
-------

adding a link containing a # to a commit message prevents editing of following text later

In a commit I made a while ago I pasted links as notes for where the added functions come from.

Later I realised one of the functions is not needed and when git commit --amending the message I noticed that I can't remove or modify any text following the first # in the text.

Bildschirmfoto von 2021-02-16 23-18-23

Maybe the edit-ability of the text can be toggled only when lines start with a #, as the default commit message comments do?

array.toString() warning

Hey, I get this warning printed out:

(Gnomit:2): Gjs-WARNING **: 18:08:38.560: Some code called array.toString() on a Uint8Array instance. Previously this would have interpreted the bytes of the array as a string, but that is nonstandard. In the future this will return the bytes as comma-separated digits. For the time being, the old behavior has been preserved, but please fix your code anyway to explicitly call ByteArray.toString(array).
(Note that array.toString() may have been called implicitly.)
0 _init/<() ["resource:///ind/ie/Gnomit/js/application.js":234]
1 main() ["resource:///ind/ie/Gnomit/js/main.js":37]
2 run() ["resource:///org/gnome/gjs/modules/package.js":225]
3 <TOP LEVEL> ["/app/bin/ind.ie.Gnomit":9]```

According to this, it looks like:

commitMessage = commitMessage.toString()

should be:

commitMessage = ByteArray.toString(commitMessage)

(Komet redirects stderr/stdout to /dev/null in production builds which may be worth considering.. but I suppose issues like this would be less visibly seen in production if that were the case).

Thanks for making this ๐Ÿ˜Š

Gnomit should handle editing other things than commit and tag messages

Currently, if you have Gnomit set as your git core.editor, it will open for git rebase -i. This will work, but is highlighted wrong. It can be avoided by setting git config --global sequence.editor to another editor, so that should be mentioned in the instructions.

A similar problem but without a workaround is when you are doing interactive add with git add -p and you choose to edit a patch hunk. Gnomit will log some warnings and then show a blank editor window:

Warning: unknown Git commit type encountered in: /path/to/.git/addp-hunk-edit.diff

(Gnomit:3): Gtk-WARNING **: 17:46:13.161: Invalid markup string: Error on line 29: Entity name '(redacted)' is not known

This could maybe be solved by allowing Gnomit to "defer" editing of addp-hunk-edit.diff to another editor that you can specify in your git config.

Don't hardcode binary dir to /app/bin

I understand gnomit is mainly meant to be used via Flatpak, but it'd be nice if it supported being run without arguments in non flatpak environments too

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.