[MRELEASE-911] release plugin forming incorrect git clone command
- Dominant language
- Java
- Stars
- 128
- Forks
- 145
- Avg merge
- 7h 7m
- Merged PRs (30d)
- 3
Description
**[sandyzden](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=sandyzden)** opened **[MRELEASE-911](https://issues.apache.org/jira/browse/MRELEASE-911?redirect=false)** and commented
git-exe plugin completely ignores the branch parameter and fails in cloning the repository during `release:perform`
e.g. git clone --branch \ \ this causes it to determine the \ as the branch parameter and failing.
Below is the error message
```
[ERROR] The git-clone command failed.
[ERROR] fatal: repository '/target/checkout' does not exist
```
A bit fiddling on the source code i found out
```
if ( version != null && ( version instanceof ScmBranch ) )
{
cl.createArg().setValue( "--branch" );
cl.createArg().setValue( version.getName() );
}
```
it needed version number, but i was not able to figure how it passed from Main Mojo to this class
---
**Affects:** 2.5.2
1 votes, 4 watchers
Contributor guide
No contributing guide indexed for this repository
Research direction
Start at the git-exe plugin's clone-command construction and trace how the branch parameter is passed from the Main Mojo into that class during release:perform. Reproduce the reported command with a branch parameter and inspect the generated arguments; done means the branch is supplied as the value of --branch and cloning no longer treats the working directory as the branch.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- git, java
- Domain
- build-system, release
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100