Skip to content

feat: Allow signing git commits; fix: Delete exact path instead of parent when source is missing#197

Merged
VojtechVitek merged 6 commits intomasterfrom
fix/git-commit-delete-exact-path
Mar 30, 2026
Merged

feat: Allow signing git commits; fix: Delete exact path instead of parent when source is missing#197
VojtechVitek merged 6 commits intomasterfrom
fix/git-commit-delete-exact-path

Conversation

@klaidliadon
Copy link
Copy Markdown
Contributor

Summary

  • Bug: In git-commit, when a listed path doesn't exist in the source repo, the else branch used dirname to compute the deletion target — deleting the entire parent directory instead of just the missing path
  • Impact: e.g. api/client/ missing caused rm -rf on api/, nuking all sibling directories
  • Fix: Delete only the exact path in the destination, or skip with a log message if it doesn't exist there either

Test plan

  • Path exists as directory → syncs normally (no change in behavior)
  • Path exists as file → syncs normally (no change in behavior)
  • Path doesn't exist, exists in destination → deletes only that exact path, not its parent
  • Path doesn't exist, doesn't exist in destination → skips with log message, no deletion

When a listed path doesn't exist in the source, the else branch used
dirname to compute the deletion target, which deleted the entire parent
directory. For example, 'api/client/' missing caused 'api/' to be nuked.

Now deletes only the exact path in the destination, or skips with a log
message if it doesn't exist there either.
@VojtechVitek VojtechVitek changed the title fix: delete exact path instead of parent when source is missing feat: Allow signing git commits; fix: Delete exact path instead of parent when source is missing Mar 30, 2026
@VojtechVitek VojtechVitek merged commit 1e65d59 into master Mar 30, 2026
2 checks passed
@VojtechVitek VojtechVitek deleted the fix/git-commit-delete-exact-path branch March 30, 2026 15:21
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.

2 participants