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.
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. |
hyperupcall
left a comment
There was a problem hiding this comment.
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
mvcommand 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-mvdue 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 mvcommand, I opted forgit-rename-fileinstead.