Column: Git Status

Git-Status column for experimental purposes.. o)

Column.Generic_Git.js.txt v0.3 (52.5 KB)

1 Like

I can't download it. Clicking the link has no effect.

Have you tried right clicking and selecting "Save link As"? Both methods work for me FWIW.

That worked. Thanks!

I don't know why normal clicks don't have an effect.

1 Like

Thanks that's very useful!

How do you use this?
I have added it to Settings -> Preferences -> Toolbars -> Scripts and checked the checkbox. Then I right-clicked the column headers in the file lister, and checked Columns -> Script -> Column.Generic: Git -> Git.Status, but when I browse a Git-repository, the column only displays a dash for all files (regardless of actual status).

This might be a conflict with Subversion.
My folder is both a Git-repo and a SVN-repo at the same time.
The column Status (found via Columns -> General -> Status icons) displays the status for Subversion (which always works fine, without any scripts). But the logs from this script shows the following:

 2022-01-28 12:12 GIT :  SCRIPT REINIT
 2022-01-28 12:12 GIT :  Column_OnGitColumn(Status): Column.Generic_Git.js.txt
 2022-01-28 12:12 GIT :      Path: R:\Settings\Directory Opus\Script AddIns
 2022-01-28 12:12 GIT :      Repo.lastTime: 0
 2022-01-28 12:12 GIT :      RepoRoot: R:\Settings
 2022-01-28 12:12 GIT :      Reload needed (first)
 2022-01-28 12:12 GIT :      FetchRepoStatus(Status)
 2022-01-28 12:12 GIT :  Fetching repo [R:\Settings]..
 2022-01-28 12:12 GIT :          RunHiddenAdvanced():
 2022-01-28 12:12 GIT :                  CMD: %comspec% /c ""Git.exe"  -C "R:\Settings\Directory Opus\Script AddIns" status --ignored --porcelain >"C:\Users\Reyhn\AppData\Local\Temp\DO.GitColumn.radC9594.tmp.txt" 2>"C:\Users\Reyhn\AppData\Local\Temp\DO.GitColumn.radC9594.tmp.txt.err.txt""
 2022-01-28 12:12 GIT :              Return: 0
 2022-01-28 12:12 GIT :              ReadFile():
 2022-01-28 12:12 GIT :                  ReadFile(), opening [C:\Users\Reyhn\AppData\Local\Temp\DO.GitColumn.radC9594.tmp.txt]..
 2022-01-28 12:12 GIT :              ReadFile():
 2022-01-28 12:12 GIT :                  ReadFile(), opening [C:\Users\Reyhn\AppData\Local\Temp\DO.GitColumn.radC9594.tmp.txt.err.txt]..
 2022-01-28 12:12 GIT :  Column_OnGitColumn(Status): Git-branch.js
 2022-01-28 12:12 GIT :      Repo.lastTime: 1643368327284
 2022-01-28 12:12 GIT :      RepoRoot: R:\Settings
 2022-01-28 12:12 GIT :      Skipping reload, column [Status].
 2022-01-28 12:12 GIT :  Column_OnGitColumn(Status): ReadMe.txt
 2022-01-28 12:12 GIT :      Repo.lastTime: 1643368327284
 2022-01-28 12:12 GIT :      RepoRoot: R:\Settings
 2022-01-28 12:12 GIT :      Skipping reload, column [Status].

Since the logs mention the column named Status, which is SVN, I guess there is a conflict causing it to not reload the Git-status.

In a directory which is only a Git-repository, this script works.

From the log it looks like you are using these git columns in "R:\Settings\Directory Opus\Script AddIns", as it runs "git status" in there. If you have the feeling, that the columns do not work, if the git-repo is also a SNV-repo, then please try "git status" in that repo on its own first. The script behind these columns does nothing else than to run "git status" and parse the output.
Maybe also check content of temporary files "C:\Users\Reyhn\AppData\Local\Temp\DO.GitColumn..*.txt".

The script still runs fine for me every day.. I do not use SVN though. o)