-
Notifications
You must be signed in to change notification settings - Fork 0
Description
Problem
On Termux and Android, pushing code from directories outside of Termux's $HOME or the official SD card private app directory is not fully supported due to restrictive permissions and file system limitations. However, users might want to push code from such locations. Currently, attempting to do this may result in errors or failed pushes, especially for files on shared storage or SD card that do not support Unix file permissions, symlinks, or executable bits.
Proposed Solution
Implement logic that, when a user initiates a push from a directory outside $HOME or the allowed SD card private directory, the tool should:
- Detect if the working directory is outside the allowed Termux private home or app-specific SD card location.
- If so:
- Copy the repository (or relevant files) to a temporary directory inside $HOME (e.g., $HOME/.git-genius-tmp/).
- Run the Git push operation from within this safe temporary directory.
- Clean up/delete the temporary copy after the push is complete or on error.
- Warn the user if any file types or properties may be lost due to file system limitations during the copy.
- Document this behavior and any limitations in the README.
Benefits
- Enables users to push code from otherwise-restricted areas in Termux and Android environments.
- Improves user experience and compatibility with Android file system security.
References
Label
bug, termux, push, storage
Type
Bug
This would help users who want to push code from shared storage or SD card (with appropriate permissions), using a safe workaround that is compatible with Android limitations.