[
https://issues.jenkins-ci.org/browse/JENKINS-13417?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=162605#comment-162605
]
chanti vlad commented on JENKINS-13417:
---------------------------------------
Problem confirmed using cygwin git on windows:
- no problem for a manual git clone / checkout as a build step
- "ERROR: Couldn't find any revision to build" using git plugin 1.1.18
I downgraded to git plugin 1.1.15 (built from source for Jenkins 1.463) and
this worked.
> git-plugin: rev-parse dereferencing tags breaks on Windows
> ----------------------------------------------------------
>
> Key: JENKINS-13417
> URL: https://issues.jenkins-ci.org/browse/JENKINS-13417
> Project: Jenkins
> Issue Type: Bug
> Components: git
> Environment: Windows 2008 R2 slave launched with cygwin ssh, cygwin
> git
> Reporter: Jay Berkenbilt
> Assignee: Nicolas De Loof
>
> The change to GitAPI.java in commit 13f6038acc4fa5b5a62413155da6fc8cfcad3fe0
> seems to break the git plugin for Windows, at least in some circumstances.
> The syntax rev^{commit} gets mangled by cmd because ^ is a quote character.
> This means that cmd passes rev{commit} to git, which as a cygwin executable
> being run from Windows, further tries to do wildcard expansion and maps this
> to revcommit. Putting "" around rev^{commit} empirically seems to work,
> though I haven't tried it in the git plugin itself.
> This C fragment:
> {code}
> #include <stdio.h>
> int main(int argc, char* argv[])
> {
> int i;
> for (i = 0; i < argc; ++i)
> {
> printf("%s\n", argv[i]);
> }
> return 0;
> }
> {code}
> when compiled with mingw to a native Windows application (a.exe) and invoked
> from cmd as a.exe a^{b} prints a{b}. When the same fragment is compiled with
> cygwin gcc to cygwin executable a.exe and is invoked the same way from cmd,
> it prints ab. Both print a^{b} when invoked from cmd as a.exe "a^{b}".
> I'm not sure what the fix is here other than perhaps detecting that this is
> windows and putting quotes around the argument in Windows.
> On another note, I left the Affects Version/s field blank. My Jenkins
> installation claims that it is using version 1.1.6. Looking at the git repo
> for the plugin, it appears that 1.1.6 should not have the ^{commit} fix, yet
> running strings on
> plugins/git/WEB-INF/classes/hudson/plugins/git/GitAPI.class clearly shows
> that my git plugin has that change in it.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.jenkins-ci.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira