Bug 489696 - [WISH] Mark modified files (in git) in project file browser
Summary: [WISH] Mark modified files (in git) in project file browser
Status: RESOLVED FIXED
Alias: None
Product: kate
Classification: Applications
Component: application (other bugs)
Version First Reported In: unspecified
Platform: Other All
: NOR wishlist
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-07-03 19:02 UTC by Diego Gangl
Modified: 2024-10-24 20:01 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments
Example from VSCode (52.80 KB, image/png)
2024-07-10 23:02 UTC, Diego Gangl
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Diego Gangl 2024-07-03 19:02:41 UTC
SUMMARY

It would be great to see at a glance which files were modified or are untracked in git in the projects file browser. It could be a different color for the text or an icon to the right side.
Comment 1 TraceyC 2024-07-10 21:35:27 UTC
I'm using the following plugins (as mentioned in your other feature request)
    Project plugin (commit / status / branch compare / stashing / file history)
    Documents Plugin (file history)
    Git blame (git blame support)

Have you tried those? It seems that they will do what you need. For details
https://kate-editor.org/post/2023/2023-02-01-using-kate-git-support/

If I go to the Git icon in the sidebar, I see categories for Staged, Modified, Untracked
Does this work for you?
Comment 2 Diego Gangl 2024-07-10 23:02:51 UTC
Created attachment 171554 [details]
Example from VSCode
Comment 3 Diego Gangl 2024-07-10 23:05:47 UTC
Hi, yes I use commit/staging widget but what I meant was inside the file browser (the one that comes with the projects plugin). Maybe it has a different name? The tooltip only says "Projects". 

I attached a screenshot from VSCode to clarify: https://bugs.kde.org/attachment.cgi?id=171554
Note the M on a modified file and U on a new one (and the different colors)
Comment 4 TraceyC 2024-07-11 14:43:03 UTC
Thank you for clarifying.
Comment 5 Bug Janitor Service 2024-10-23 17:55:31 UTC
A possibly relevant merge request was started @ https://invent.kde.org/utilities/kate/-/merge_requests/1632
Comment 6 Christoph Cullmann 2024-10-24 20:01:07 UTC
Git commit c81ca8167bfda2e4418a05191ddc4e19033dbeb3 by Christoph Cullmann, on behalf of Waqar Ahmed.
Committed on 24/10/2024 at 19:17.
Pushed by cullmann into branch 'master'.

Show git status with file name in project tree

Files in project tree view now show their status in git. The existing
git status data is reused for this. I had to make the git widget a bit
less lazy to make this work correctly.

The status is shown minimally i.e., a small circle is drawn in front of
the file name. If the file is modified the circle is red, if the file is
staged its green. The parent folders of the said file show the circle in
front of their name as well. I haven't included Untracked files yet as it might
slow things down, but we'll see. Perhaps it makes sense to add Untracked
files too.

M  +1    -1    addons/project/git/gitstatus.cpp
M  +1    -0    addons/project/git/gitstatus.h
M  +29   -14   addons/project/gitwidget.cpp
M  +15   -11   addons/project/gitwidget.h
M  +60   -0    addons/project/kateproject.cpp
M  +16   -0    addons/project/kateproject.h
M  +1    -1    addons/project/kateprojectpluginview.cpp
M  +5    -5    addons/project/kateprojectpluginview.h
M  +59   -0    addons/project/kateprojectviewtree.cpp

https://invent.kde.org/utilities/kate/-/commit/c81ca8167bfda2e4418a05191ddc4e19033dbeb3