graphical Git GUI front-end?
  • Order of the Butterfly
    Order of the Butterfly
    Samurai_Crow
    Posts: 161 from 2009/12/10
    From: Minnesota, USA
    Hello,

    I'm debating the possibility of a GUI front-end for Git written in Hollywood. The current blocker is parsing the output of "git status". I see there is a short form of the output but no promises.

    If completed, this won't be VS Codium but at least it will allow the use of a file requester from MUI to multi-select the files to add.

    Questions? Comments?
  • »26.01.21 - 16:33
    Profile
  • pOS
  • Order of the Butterfly
    Order of the Butterfly
    pOS
    Posts: 216 from 2003/11/14
    From: Bavaria
    Some days ago I already debated with myself ;)

    And started a project.

    First version shall offer:

    A listview showing all unstaged/untracked files with their status (new, modified, deleted, renamed)
    You then can select one, several or all files and stage them.

    A second listview shows all staged files with their status (staged, modified).
    Again you can select one, several or all files and commit (and optionally push) them.
    Or unstage them.

    Situations, where a file is both staged and unstaged at the same time, are also handled.

    There will also be a function for casual users to stage, commit (and optionally push) all changes at once.

    If there is time, I also intend to offer the possibility to set a file back to its initial (unmodified) state. Technically revert it back to HEAD revision.


    I'm using Hollywood, too.

    Requirements will be MorphOS SDK >=3.15
  • »26.01.21 - 21:20
    Profile Visit Website
  • Order of the Butterfly
    Order of the Butterfly
    Samurai_Crow
    Posts: 161 from 2009/12/10
    From: Minnesota, USA
    Sweet! I'll look forward to it!
  • »27.01.21 - 04:29
    Profile
  • Priest of the Order of the Butterfly
    Priest of the Order of the Butterfly
    eliot
    Posts: 565 from 2004/4/15
    I don‘t know if this is true for mos, but on
    linux git provides a c library.
    You shoul not need to use the cmd tool
    and string parsing.
    regards
    eliot
  • »27.01.21 - 05:14
    Profile
  • MorphOS Developer
    Piru
    Posts: 587 from 2003/2/24
    From: finland, the l...
    @eliot

    The git build process does produce a libgit.a, but this library is not distributed with the SDK separately. Even linux git packaging doesn't offer it separately as far as I can tell.

    Anyway you can always grab the latest SDK source archive from the MorphOS Team website and find the MorphOS git from sdk-source/git directory.

    It is the official git btw. I spent quite some time sorting out all the kinks in ixemul, threading, gcc TLS etc to make it all work right. Earlier git versions relied on libpth which turned out not to be a suitable long term solution, so a new port was needed.

    I'm not sure how convenient it would be to link ixemul static library with a Hollywood application however. I'd hazard a guess that it won't work very well. In fact 99% of the time trying to mix ixemul and non-ixemul will result in trouble. In my opinion just using the git command(s) and parsing the command output is probably the best course to take.

    However, this is just my opinion, git is GPL after all so anyone can do whatever they want in the end. :-)

    [ Edited by Piru 27.01.2021 - 10:18 ]
  • »27.01.21 - 09:07
    Profile
  • MorphOS Developer
    CISC
    Posts: 619 from 2005/8/27
    From: the land with ...
    Pretty much every graphical frontend for GIT uses libgit2 (completely separate implementation) to do all the heavy lifting on the local repository and then runs the commandline version whenever it needs to do anything remotely.

    I saw someone asking for a shared library version of libgit2 in another thread, but that hardly makes much sense (I don't think libgit2 is fully reentrant either, so it will have limited value either way), just statically link it.


    - CISC
  • »28.01.21 - 07:03
    Profile
  • Order of the Butterfly
    Order of the Butterfly
    Samurai_Crow
    Posts: 161 from 2009/12/10
    From: Minnesota, USA
    @CISC

    Using Hollywood's PatternFindStrShort command makes parsing easy. No need to port LibGIT2 from AmigaOS 4.
  • »28.01.21 - 09:33
    Profile