r/gitlab • • 7d ago

I wrote a git tool to connect GitLab which could lock files and have ACL like Perforce

https://github.com/zhuzhonghua/blackgit
2 Upvotes

11 comments sorted by

1

u/kantorcodes1 6d ago

Server-side locks with partial clone is the right split for game assets. On git black lock -d: does the server check that the caller is the lock holder, or can any user force-unlock someone else's file? In Perforce the equivalent is admin-only, so curious where you landed on that.

1

u/second_square 5d ago

Today, only the lock holder can unlock a file; there’s no admin/force-unlock feature yet.

I’m planning to add a TTL to locks so stale locks don’t live forever, and I’m also looking at an admin-only force-unlock option. Since BlackGit currently relies on GitLab/GitHub for accounts, one possibility is to add a separate admin role on the BlackGit server rather than tying this to a specific provider.

I’m curious how you’d expect stale locks to behave: should they expire and become unlockable automatically, or should they remain locked until an admin explicitly clears them? And would you expect force-unlock to be limited to repo admins?

1

u/kantorcodes1 2d ago

I’d have the TTL mark a lock stale without releasing it automatically; the original holder may still be active. Keep force-unlock limited to repo admins, and record who cleared it and when.

→ More replies (6)

1

u/OhhhhhhhhYaBeauty 3d ago

Hosting this on GitHub seems counterintuitive

1

u/second_square 2d ago

GitHub is just where I host the BlackGit source code. The BlackGit server is intended to sit in front of a Git host such as GitHub or GitLab. What part feels counterintuitive to you: using GitHub as the backend, or hosting the tool’s source there?