Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support "git maintenance" #11593

Open
drewnoakes opened this issue Feb 18, 2024 · 5 comments
Open

Support "git maintenance" #11593

drewnoakes opened this issue Feb 18, 2024 · 5 comments

Comments

@drewnoakes
Copy link
Member

Feature description

git maintenance is a new-ish feature of git that periodically runs various operations in the background to speed up day-to-day use of a git repo.

It'd be great if GE allowed this feature to be enabed or disabled on a repo via the UI.

Potentially it'd make sense to have a feature that caused GE to enable it on all repos automatically.

There are probably other ideas here too. It's a new feature and something to explore. See #11592 for one such consideration.

Environment

  • Git Extensions 4.2.1.17611
  • Build b0c0b28
  • Git 2.43.0.windows.1
  • Microsoft Windows NT 10.0.22631.0
  • .NET 6.0.27
  • DPI 144dpi (150% scaling)
  • Portable: False
  • Microsoft.WindowsDesktop.App Versions
    Microsoft.WindowsDesktop.App 3.1.32 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
    Microsoft.WindowsDesktop.App 6.0.26 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
    Microsoft.WindowsDesktop.App 6.0.27 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
    Microsoft.WindowsDesktop.App 7.0.15 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
    Microsoft.WindowsDesktop.App 7.0.16 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
    Microsoft.WindowsDesktop.App 8.0.1 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
    Microsoft.WindowsDesktop.App 8.0.2 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
@gerhardol
Copy link
Member

What "support" do you expect?
Maybe:

  1. Status icon (toolbar, next to refresh?) to see current status (schedule etc), also to start or configure
  2. Start automatically (if globally configured) when opening a repo
  3. Configure which steps to run, global/local Git settings

Should git-maintenance be unregister when closing the repo? This will not be safe to handle.
See maintenance status in dashboard?
Stop/unregister may be a follow p.

@drewnoakes
Copy link
Member Author

Status icon (toolbar, next to refresh?) to see current status (schedule etc), also to start or configure

I can imagine a toggle button for the repo, maybe in a menu or on a toolbar.

Start automatically (if globally configured) when opening a repo

I would enable that option if it were available. However I don't know what downside there is if you have very many repos on your machine.

Should git-maintenance be unregister when closing the repo?

If by "closing" you mean unloading it in GE, then I don't think that fits the expected usage of the feature. Behind the scenes, git maintenance sets up cron jobs to do things like GC, prefetching, repacking, etc. These are likely to happen infrequently, not necessarily while you have the repo open.

Configure which steps to run, global/local Git settings

Also sounds good, though I think the defaults seem pretty sensible to me.

I think most of the value would come from making it easy to turn this feature on. The benefit would be faster git operations without having to think about it.

@vbjay
Copy link
Contributor

vbjay commented Feb 19, 2024

A dialog that supports https://git-scm.com/docs/git-maintenance#Documentation/git-maintenance.txt-run letting user pick the tasks. What if I don't want it to automatically run but still run when I chose.

@gerhardol
Copy link
Member

I work with about 100 application repos each with 2-10 submodules. Some are seldom opened, but I open about 50 repos (superprojects or submodules) in a week (that is how long recently used is kept).
I do not want to start git-maintenance for every repo I have once opened in GE, when unloading I do not want them to run.. But run once in the background when opened could be useful.

So there are many options on the action when opening a PR, like run once, enable schedule, just status.
I guess GE could keep track of opened repos with git-maintenance activated (repos are pruned from Dashboard too quickly for me at least) but it would not be complete.

Just a status icon with a option to start/schedule is a good start.

@RussKie
Copy link
Member

RussKie commented Feb 22, 2024

I do share the noted concerns about git uncontrollably scheduling background work when a user switching between repos (e.g., I do that a lot). Whilst running maintenance tasks could be beneficial, it is something, I think, the user should run consciously/purposefully.

Just a status icon with a option to start/schedule is a good start.

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants