Skip to content

Conversation

basil
Copy link
Member

@basil basil commented Sep 3, 2025

Backport #1326 and #1327 to the 6.2.x line.

…enkinsci#1326)

Command line git 2.51.0 has deprecated the "git whatchanged" command and
recommends that it be replaced with "git log --raw".  Refer to the blog
post: https://github.blog/open-source/git/highlights-from-git-2-51/

Testing done:

Interactive testing confirmed that without this change, the changelog
that is usually displayed on a freestyle project will silently remain
empty when using command line git 2.51.0.

With this change, the changelog displays as expected.

Automated tests pass on:

* Debian 11 (Git 2.30)
* Debian 12 (Git 2.39)
* FreeBSD 14 (Git 2.50)
* Red Hat 8 (Git 2.51, built from source code)
* Ubuntu 22 (Git 2.34)
* Ubuntu 24 (Git 2.43)
* Windows 11 (Git 2.50.1)

Those test combinations are a wide range of versions of command line git.

(cherry picked from commit 9999864)
Git client 6.3.1 adapted the git client plugin to support command line
git 2.51.0 where the "whatchanged" command has been deprecated.  However,
the change introduced an inconsistency between the CLI git implementation
and the JGit implementation.

Prior to git client plugin 6.3.1, the changelog skipped merge commits
in all cases.

With git client 6.3.1, the CLI git changelog includes merge commits.
With git client 6.3.1, the JGit changelog does not include merge commits.

Testing done:

* Confirmed the bug with interactive testing of git client plugin 6.3.1
* Wrote an automated test that shows the inconsistency
* Confirmed that the automated test fails with git client 6.3.1 and
  passes with the fix

(cherry picked from commit 358e279)
@basil basil requested a review from MarkEWaite September 3, 2025 00:23
@basil basil added the bug Incorrect or flawed behavior label Sep 3, 2025
@github-actions github-actions bot added documentation Improvements or additions to documentation tests Automated test addition or improvement labels Sep 3, 2025
@basil basil changed the title Backport Backport #1326 and #1327 to the 6.2.x line Sep 3, 2025
@MarkEWaite MarkEWaite removed documentation Improvements or additions to documentation tests Automated test addition or improvement labels Sep 3, 2025
Copy link
Contributor

@MarkEWaite MarkEWaite left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@basil
Copy link
Member Author

basil commented Sep 3, 2025

CI build is green

@MarkEWaite
Copy link
Contributor

CI build is green

Thanks. I plan to merge and release this before the end of this week so that it can be included in the plugin BOM.

(cherry picked from commit 20090a8)
@MarkEWaite MarkEWaite requested a review from a team as a code owner September 3, 2025 15:47
@github-actions github-actions bot added documentation Improvements or additions to documentation tests Automated test addition or improvement labels Sep 3, 2025
@MarkEWaite MarkEWaite changed the title Backport #1326 and #1327 to the 6.2.x line Support command line git 2.51.0 Sep 3, 2025
@MarkEWaite MarkEWaite changed the base branch from 6.2.x to stable-6.2 September 3, 2025 16:02
@MarkEWaite MarkEWaite removed documentation Improvements or additions to documentation tests Automated test addition or improvement labels Sep 3, 2025
@MarkEWaite MarkEWaite merged commit bace0af into jenkinsci:stable-6.2 Sep 3, 2025
18 checks passed
@basil basil deleted the backport branch September 3, 2025 17:00
MarkEWaite added a commit to MarkEWaite/update-center2 that referenced this pull request Sep 4, 2025
https://www.jenkins.io/security/advisory/2025-09-03/#SECURITY-3590 is
fixed by backporting the changes from Git Client Plugin 6.3.3

Backport from commit 20090a86c3ebc72e5283c882de73e3a4459137bb

Git Client Plugin 6.2.1 also includes fixes to support command line
git 2.51.0.  Those changes were originally from pull requests:

* jenkinsci/git-client-plugin#1326
* jenkinsci/git-client-plugin#1327

Fixed by pull request:

* jenkinsci/git-client-plugin#1332

Testing done:

I've run interactive tests with Git Client Plugin 6.2.1 incremental
build and found no issues.
Kevin-CB pushed a commit to jenkins-infra/update-center2 that referenced this pull request Sep 5, 2025
…#887)

* Mark SECURITY-3590 as also fixed in Git Client Plugin 6.2.1

https://www.jenkins.io/security/advisory/2025-09-03/#SECURITY-3590 is
fixed by backporting the changes from Git Client Plugin 6.3.3

Backport from commit 20090a86c3ebc72e5283c882de73e3a4459137bb

Git Client Plugin 6.2.1 also includes fixes to support command line
git 2.51.0.  Those changes were originally from pull requests:

* jenkinsci/git-client-plugin#1326
* jenkinsci/git-client-plugin#1327

Fixed by pull request:

* jenkinsci/git-client-plugin#1332

Testing done:

I've run interactive tests with Git Client Plugin 6.2.1 incremental
build and found no issues.

* Mark SECURITY-3590 as also fixed in Git Client Plugin 6.1.4

https://www.jenkins.io/security/advisory/2025-09-03/#SECURITY-3590 is
fixed by backporting the changes from Git Client Plugin 6.3.3

Backport from commit 20090a86c3ebc72e5283c882de73e3a4459137bb

Git Client Plugin 6.1.4 also includes fixes to support command line
git 2.51.0.  Those changes were originally from pull requests:

* jenkinsci/git-client-plugin#1326
* jenkinsci/git-client-plugin#1327

Fixed by pull request:

* jenkinsci/git-client-plugin#1333

Testing done:

I've run interactive tests with a Git Client Plugin 6.1.4 development
build and found no issues.  Details are described in pull request:

* jenkinsci/git-client-plugin#1333
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Incorrect or flawed behavior
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants