Skip to content

Add lock and unlock so folders resist delete - #29

Merged
claybridges merged 3 commits into
mainfrom
pr/lockFolder
Oct 22, 2026
Merged

claybridges merged 3 commits into
mainfrom
pr/lockFolder

Conversation

@claybridges

@claybridges claybridges commented Oct 22, 2026 •

Copy link
Copy Markdown
Owner

Semi-permanent folders need protection from a stray delete.

  • Locks live in the multi-valued local git config key folder.locked
  • lock and unlock take a folder or infer it from the current branch; both are idempotent
  • A lock blocks delete (all forms) and rename (old or new name); --force does not override
  • increment, squash and rebasing locked folders still work
  • lock --list shows the locked folders
  • Raw git branch -D is not prevented

Resolves #9

🤖 Generated with Claude Code

@claybridges claybridges left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed.

@claybridges
claybridges merged commit 6634c18 into main Oct 22, 2026
2 checks passed
@claybridges
claybridges deleted the pr/lockFolder branch October 22, 2026 21:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Lock folder to prevent deletion?

1 participant