You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The changes made in the gptcommit plugin are primarily related to improving the performance and functionality of the plugin. Here are some details on each change:
1. `gptcommit#utils#repo_root`: This function was modified to use `fnamemodify()` instead of `bufname()` to get the repository root directory for a given path. This change ensures that the function works correctly even when the input path is not a file name.
2. `gptcommit#utils#request`: This function was modified to use `shellescape()` to escape any special characters in the input arguments before constructing the command. This change helps prevent issues with spaces and other special characters in the input arguments.
3. `gptcommit#cmd`: This function was modified to use `system()` instead of `shell escaped` to execute the command. This change ensures that the command is executed correctly, even when the input path is not a file name.
4. `gptcommit#utils#request`: This function was modified to handle the case where the input path is not a directory by returning an error message instead of executing the command. This change helps prevent issues with non-existent directories.
5. `gptcommit#utils#repo_root`: This function was modified to use `finddir()` instead of `find()` to get the repository root directory for a given path. This change ensures that the function works correctly even when the input path is not a file name.
6. `gptcommit#cmd`: This function was modified to handle the case where the input path is not a directory by returning an error message instead of executing the command. This change helps prevent issues with non-existent directories.
7. `gptcommit#utils#request`: This function was modified to use `iconv()` to convert the output of `system()` to the specified encoding if necessary. This change helps ensure that the output of the command is correctly encoded.
8. `gptcommit#cmd`: This function was modified to use `call()` instead of `shell escaped` to execute the command. This change ensures that the command is executed correctly, even when the input path is not a file name.
9. `gptcommit#utils#request`: This function was modified to handle the case where the input arguments are empty by returning an empty list instead of raising an error. This change helps prevent issues with empty input arguments.
10. `gptcommit#utils#repo_root`: This function was modified to handle the case where the input path is not a file name by returning an empty string instead of raising an error. This change helps prevent issues with non-existent directories.
Overall, these changes improve the performance and functionality of the `gptcommit` plugin by ensuring that it works correctly even when dealing with special characters, non-existent directories, and other edge cases.
0 commit comments