-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Labels
enhancementNew feature or requestNew feature or requestlanguage/goRequires the knowledge of "Go"Requires the knowledge of "Go"
Description
Problem
Currently, running gitx -i/--init will initialize a git repository in the current directory without any additional confirmation.
This can be risky if the command is executed from sensitive or unintended locations (e.g. /, $HOME, /tmp), where initializing a repository is usually not desired.
Proposed Solution
Add a safety warning before running git init when the current directory is considered potentially unsafe.
Suggested behavior:
- When
gitx -i/--initis run in a sensitive directory:- Print a clear warning explaining the risk.
- Ask the user for confirmation (e.g.
Continue? [y/N]:). - Abort the operation if the user does not explicitly confirm.
- When run in a normal project directory:
- Proceed without any additional prompt.
Notes
- This check would only apply when using the
-i/--initflag. - The TUI should only open after successful initialization.
- Happy to adjust the scope or behavior based on maintainer feedback.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestlanguage/goRequires the knowledge of "Go"Requires the knowledge of "Go"