git-client-plugin icon indicating copy to clipboard operation
git-client-plugin copied to clipboard

[JENKINS-70303] Ignore leading and trailing spaces in refspecs

Open HimaTeju opened this issue 1 year ago • 1 comments
trafficstars

JENKINS-70303 - ignore leading and trailing spaces in refspecs

I am using trim() method to remove the leading space characters.

Describe the big picture of your changes here to explain to the maintainers why this pull request should be accepted. If it fixes a bug or resolves a feature request, include a link to the issue. The Link to the issue: https://issues.jenkins.io/browse/JENKINS-70303

Checklist

  • [x] I have read the CONTRIBUTING doc
  • [x] I have referenced the Jira issue related to my changes in one or more commit messages
  • [ ] I have added tests that verify my changes
  • [ ] Unit tests pass locally with my changes
  • [ ] I have added documentation as necessary
  • [ ] No Javadoc warnings were introduced with my changes
  • [ ] No spotbugs warnings were introduced with my changes
  • [ ] I have interactively tested my changes

Types of changes

What types of changes does your code introduce?

  • [x] Bug fix (non-breaking change which fixes an issue)

HimaTeju avatar Jan 14 '24 08:01 HimaTeju

Thanks for the pull request. This proposed change introduces a new spotbugs warning. Please refer to the contributing guide where it says:

Please don’t introduce new spotbugs output

Please perform interactive tests of the change as noted in the bug report

Please include the link to the issue in the pull request, instead of leaving the "JENKINS-xxxx" entry blank.

Please add one or more automated tests to confirm the problem can be duplicated in an automated test and that the code change resolves the issue. I've added an initial test in 40224e452ef4bbc4531f4e8cbf6ee4333774f931 as a beginning. That test fails with JGit before your change and after your change. I'm not sure it is the best test, but it is one test for consideration.

MarkEWaite avatar Jan 14 '24 14:01 MarkEWaite

@HimaTeju it looks like this is an inactive pull request. Do you plan to work on the concerns that I noted in my earlier comment https://github.com/jenkinsci/git-client-plugin/pull/1095#issuecomment-1890970433 ? If I don't see a response within a week, I'll close this pull request due to inactivity.

MarkEWaite avatar Mar 30 '24 14:03 MarkEWaite