jenkinsci/git-client-plugin — pull request #121 by drvdijk (2014-03-11 20:43:43+00:00)
Title: When cloning, next to remote URL, also set fetch refspec.

Hi! Sorry if I'm not following any default procedures on creating pull requests or issue tracking, I'm not too familiar with it.

I spent quite a while figuring out why my Jenkins installation couldn't run a `jgitflow:release-start` maven task (using the [Maven JGitFlow Plugin](https://bitbucket.org/atlassian/maven-jgitflow-plugin)), while a command line mvn invocation could. Turns out when cloning the repository, the git-client-plugin doesn't do a clone, but an init-fetch combination. It does set the remote URL correctly, but does not set a `fetch = +refs/heads/*:refs/remotes/origin/*` line in the `.git/config` file for the `[remote "origin"]` section. Then when JGitFlow executes a `git fetch`, nothing is fetched, because there is no fetch refspec.

Not really sure this is the way you would want this implemented, but at least it gets the idea across I hope. What would be the proper way to get this into a release so that I can happily use Jenkins to perform my releases using JGitFlow?

Thanks!