Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
On Windows command prompt, '^' is an escape character (http://en.wikipedia.org/wiki/Escape_character#Windows_Command_Prompt) This isn't a problem if 'git' we are executing is git.exe, because '^' is a special character only for the command processor, but if 'git' we are executing is git.cmd (which is the case of msysgit), then the arguments we pass in here ends up getting processed by the command processor, and so 'xyz^{commit}' becomes 'xyz{commit}' and fails. Since we can't really tell if we are calling into git.exe or git.cmd, the best we can do for Windows is not to use '^{commit}'. This reverts 13f6038 and it will not dereference tags, but it's far better than having this method completely broken. See JENKINS-13007 where this blew up on Windows users. I filed msysgit/msysgit#36 as a bug in msysgit.
- Loading branch information
8810661
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.
@kohsuke thanks!
8810661
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.
It's also a problem with Cygwin's git.exe.
8810661
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.
@meowsqueak are you saying that this fix broke something with Cygwin's git.exe?
8810661
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.
No, I'm just saying that the original problem was also an issue for Cygwin's git.exe, not just msysgit. Therefore you can't rely on the .exe vs .cmd differentiation. The changelog statement "This isn't a problem if 'git' we are executing is git.exe" is not true.
I haven't tested the fix on Cygwin yet.