-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add rename-file command #1149
Conversation
- Added new command 'rename-file' to rename files and directories within a Git repository regardless of filesystem case-sensitivity. - Updated AUTHORS and documentation in Commands.md. - Implemented bash, zsh, and fish completions for 'rename-file'. - Created manual pages for 'rename-file' in various formats (man, html, md). - Updated index.txt to include 'rename-file' command.
# Check if the destination directory exists | ||
DEST_DIR=$(dirname "$DESTINATION") | ||
if ! check_case_sensitive_exists "$DEST_DIR"; then | ||
echo "Error: Destination directory '$DEST_DIR' does not exist." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Small nit, but it would be good to redirect all errors to standard error. I believe that's consistent with the rest of the code;
Thanks, this looks good - I had a few suggestions; |
Apologies, just catching up here. What's left before this can be merged? |
@CodeByZach Hey, a must is to have the lint check in CI pass (if it's a lot of issues, running |
|
Lint CI repairs
@CodeByZach Thank you for the update; I'll be able to merge this once @spacewander's comments here and here are addressed; |
Per suggestions: - tj#1149 (comment) - tj#1149 (comment)
Per: - tj#1149 (comment) Co-authored-by: Edwin Kofler <[email protected]>
Should now be addressed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, changes are good
Rename a file or directory and ensure Git recognizes the change, regardless of filesystem case-sensitivity. It combines the functionality of the
mv
command andgit mv
. This is particularly useful for renaming files or directories to change only their case, which might not be detected by Git on case-insensitive filesystems.I initially considered naming it
git-mv
due to its intuitive functionality. However, I noticed that the naming convention in the repository includes both commands with and without the dash following "git-". To avoid conflict with the nativegit mv
command, I opted forgit-rename-file
instead.