Plugin - Git Commander - Git and total commander!

Discuss and announce Total Commander plugins, addons and other useful tools here, both their usage and their development.

Moderators: white, Hacker, petermad, Stefan2

User avatar
tbeu
Power Member
Power Member
Posts: 1336
Joined: 2003-07-04, 07:52 UTC
Location: Germany
Contact:

Re: Plugin - Git Commander - Git and total commander!

Post by *tbeu »

I will see what I can do. At least there is git_submodule_branch, which might be of use here.
TC plugins: Autodesk 3ds Max / Inventor / Revit Preview, FileInDir, ImageMetaData (JPG Comment/EXIF/IPTC/XMP), MATLAB MAT-file Viewer, Mover, SetFolderDate, Solid Edge Preview, Zip2Zero and more
Rucha
Junior Member
Junior Member
Posts: 9
Joined: 2021-01-31, 08:43 UTC

Re: Plugin - Git Commander - Git and total commander!

Post by *Rucha »

It would be great. Thanks!
User avatar
tbeu
Power Member
Power Member
Posts: 1336
Joined: 2003-07-04, 07:52 UTC
Location: Germany
Contact:

Re: Plugin - Git Commander - Git and total commander!

Post by *tbeu »

Do you have set the branch In your .gitmodules file?
TC plugins: Autodesk 3ds Max / Inventor / Revit Preview, FileInDir, ImageMetaData (JPG Comment/EXIF/IPTC/XMP), MATLAB MAT-file Viewer, Mover, SetFolderDate, Solid Edge Preview, Zip2Zero and more
Rucha
Junior Member
Junior Member
Posts: 9
Joined: 2021-01-31, 08:43 UTC

Re: Plugin - Git Commander - Git and total commander!

Post by *Rucha »

Yes, but it shows wrong branch name :?
User avatar
tbeu
Power Member
Power Member
Posts: 1336
Joined: 2003-07-04, 07:52 UTC
Location: Germany
Contact:

Re: Plugin - Git Commander - Git and total commander!

Post by *tbeu »

As far as I figured out libgit2 can only retrieve that branch name as specified in .gitmodules.
TC plugins: Autodesk 3ds Max / Inventor / Revit Preview, FileInDir, ImageMetaData (JPG Comment/EXIF/IPTC/XMP), MATLAB MAT-file Viewer, Mover, SetFolderDate, Solid Edge Preview, Zip2Zero and more
Rucha
Junior Member
Junior Member
Posts: 9
Joined: 2021-01-31, 08:43 UTC

Re: Plugin - Git Commander - Git and total commander!

Post by *Rucha »

Correct branch name is in FETCH_HEAD file inside submodule folder.
User avatar
tbeu
Power Member
Power Member
Posts: 1336
Joined: 2003-07-04, 07:52 UTC
Location: Germany
Contact:

Re: Plugin - Git Commander - Git and total commander!

Post by *tbeu »

Hm, I see. But I have no idea how to access this information. Any libgit2 expert reading?
TC plugins: Autodesk 3ds Max / Inventor / Revit Preview, FileInDir, ImageMetaData (JPG Comment/EXIF/IPTC/XMP), MATLAB MAT-file Viewer, Mover, SetFolderDate, Solid Edge Preview, Zip2Zero and more
Rucha
Junior Member
Junior Member
Posts: 9
Joined: 2021-01-31, 08:43 UTC

Re: Plugin - Git Commander - Git and total commander!

Post by *Rucha »

Do you have read access from plugin code to the file?
Rucha
Junior Member
Junior Member
Posts: 9
Joined: 2021-01-31, 08:43 UTC

Re: Plugin - Git Commander - Git and total commander!

Post by *Rucha »

Sorry, but I found one bug.
Branch stay with old name until reload dir (entering and leaving folder inside - Dbl Enter). All other columns refresh by itself on TC window getting focus.
User avatar
tbeu
Power Member
Power Member
Posts: 1336
Joined: 2003-07-04, 07:52 UTC
Location: Germany
Contact:

Re: Plugin - Git Commander - Git and total commander!

Post by *tbeu »

Related to viewtopic.php?f=6&t=73788. Plugin does not get notified when directory content changes.
TC plugins: Autodesk 3ds Max / Inventor / Revit Preview, FileInDir, ImageMetaData (JPG Comment/EXIF/IPTC/XMP), MATLAB MAT-file Viewer, Mover, SetFolderDate, Solid Edge Preview, Zip2Zero and more
pplupo
Member
Member
Posts: 102
Joined: 2019-12-02, 16:26 UTC
Location: Canada
Contact:

Re: Plugin - Git Commander - Git and total commander!

Post by *pplupo »

I've found an issue with how the tooltip suggestions were presented. They cause blank lines to show up on non-versioned files/dirs. To fix it, please refer to https://www.ghisler.ch/board/viewtopic.php?f=35&t=74816
jmwap
Member
Member
Posts: 121
Joined: 2008-03-23, 12:40 UTC

Re: Plugin - Git Commander - Git and total commander!

Post by *jmwap »

hey, nice plugin!

I thought of creating a Custom column, and auto switch to it whenever the current dir contains a .git subdir (and all descendants), but I cannot get a rule to do that.

Does anyone here have done that? if not, how are people using this? you switch to a custom view manually every time?

thanks
User avatar
petermad
Power Member
Power Member
Posts: 14739
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: Plugin - Git Commander - Git and total commander!

Post by *petermad »

I thought of creating a Custom column, and auto switch to it whenever the current dir contains a .git subdir (and all descendants), but I cannot get a rule to do that.
I don't think it is possible to set a rule based on subdir names, only on file names. The content of the Directory field is alway only compared with the current dir (+ path if stated), but not with subdirs, and if you try to put a directory (as dirname\ ) in the File types field, then TC automatically moves it to the Directory field on saving the rule.
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50b4 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
hi5
Power Member
Power Member
Posts: 551
Joined: 2012-11-03, 11:35 UTC
Contact:

Re: Plugin - Git Commander - Git and total commander!

Post by *hi5 »

Checking for .gitignore .gitattributes might do the trick in many cases and they are easy to add to folders that don't have them yet.

Edit: see few posts further, a "better" solution might be to use the "path"
Last edited by hi5 on 2021-06-27, 07:49 UTC, edited 1 time in total.
F4MiniMenu (Forum) - Open selected file(s) from TC in defined editor(s) - A (minimalistic) clone of F4Menu
Source at GitHub (AutoHotkey). TCSyncComments (copy file comments)
jmwap
Member
Member
Posts: 121
Joined: 2008-03-23, 12:40 UTC

Re: Plugin - Git Commander - Git and total commander!

Post by *jmwap »

hi5 wrote: 2021-06-26, 07:11 UTC Checking for .gitignore .gitattributes might do the trick in many cases and they are easy to add to folders that don't have them yet.
that would work, but now that I think of it, only for the git top level folder. So there is no good way to say:

"any folder that is under a folder containing a .git dir or a .gitignore file" correct?
that is a real pity, not sure I want to keep changing the view by hand every time I am in a source dir...
Post Reply