News for hackers. Stuff that matters.
Re:Abandon Your DVCS and Return to Sanity (2015) by WorldMaker on Wednesday June 01, 2016 @02:47PM (#11817080)
Rather than a special file you could use special branches and a new primitive git object for those branches. Git garbage collection would eventually deal with the pollution of that.

Using commits (with no file contents) as your locks (rather than creating a new git primitive object), you'd have an easily automatable workflow along the lines of:

    # Clear current locks
    git push origin --delete binedit/WorldMaker
    git branch -D binedit/WorldMaker
    git gc # Optionally force a garbage collection

    # Create new lock
    git checkout master -b binedit/WorldMaker  
    git commit --allow-empty -m "binedit: file/to/edit.psd"
    git push --set-upstream origin binedit/WorldMaker
    git checkout master # Avoid adding actual commits to the binedit branch
Searching for binedit locks would be git fetch all remote binedit/* branches and review their commit messages. Not the fastest system to query in the world, but you could cache it well, presumably. You can also fetch such branches from multiple remotes, leaving it somewhat distributed a tool, too.

There are no comments on this comment yet.