git-s3-push icon indicating copy to clipboard operation
git-s3-push copied to clipboard

Push to S3 fails when the commit message contains a double-quote character

Open philipmgrant opened this issue 1 year ago • 0 comments

If the last commit message contains a double-quote character ("), then the push to S3 fails with a message like this:

Uploading:  0e31d3e Commit "test" files
open 0e31d3e Commit "test" files: The filename, directory name, or volume label syntax is incorrect.

(where 0e31d3e is the ID of the commit and Commit "test" files is the description)

In my testing, sometimes the error happens at the start of the push; but other times, some of the files do get successfully uploaded to S3 before the error is thrown.

As a workaround, amending the commit to remove the " from the message resolves the error and allows the push to succeed.

From the error message, I'm guessing that the double-quote causes the Git output to be misparsed such that the commit ID and message are misinterpreted as if they were the filename of a committed file.

This is with Git version 2.45.1.windows.1, on Windows 10.

philipmgrant avatar May 20 '24 12:05 philipmgrant