branch parameter allows passing additional flag to git clone
While experimenting with different branches from a git repository we noticed that it's possible to pass an additional flag to git clone via the branch parameter in the source configuration, for example:
resources:
- name: some-repo
type: git
source:
uri: some-uri
branch: some-branch --no-single-branch
In that case the --single-branch option passed to git clone in the in-script is overridden, it looks like the branch-parameter is not checked before passing it on.
Maybe one possible solution could be to split the parameter on space and ignore the rest (or exit with an error code?).
I would actually like to vote against this being impemented.
This undocumented feature is a life saver for our team to be able to perform a git diff between different branches in the same repo