Details
-
Bug
-
Resolution: Fixed
-
Critical
-
None
-
Java 1.8
Git 2.4.5
Git Client Plugin: 1.18.0
Git Plugin: 2.4.0
Description
The RAW command listed here: https://github.com/jenkinsci/git-client-plugin/blob/b6fe319297b9ef5ceb29b260aa37c6cf994b414a/src/main/java/org/jenkinsci/plugins/gitclient/CliGitAPIImpl.java#L734
Is using the old formatting of "%ai" and "%ci" for retrieving the Author and Committer timestamps. In Git 2.0 and above, the lowercase "i" refers to "ISO-8601-like" while a newly added uppercase "I" returns "ISO-8601-strict": http://git-scm.com/docs/pretty-formats
I'm not sure why, but when upgrading 1.14.1 of git-client to 1.18.0, this started breaking for us. We're now getting -1 for all timestamps. I think it's from this change: https://github.com/jenkinsci/git-client-plugin/commit/de49c9bf21f560ac3851c4f7ea3a3597a114ac8e#diff-4a13310f7c84a9d6e133def48c0aed5a
Here is an example:
$ git --version git version 2.4.5 $ git whatchanged --no-abbrev -M --format="commit %H%ntree %T%nparent %P%nauthor %aN <%aE> %ai%ncommitter %cN <%cE> %ci%n%n%w(76,4,4)%s%n%n%b" commit 688eda2a898ba11e6173f75d8fbd19cc172abb6a tree 12a4ac27c0f153644daf083c7e1601644ac7ab17 parent d1da71b1f09f675af86b7fe1937d9c5f2740b182 author Mark Waite <mark.earl.waite@gmail.com> 2015-08-20 08:48:02 -0600 committer Mark Waite <mark.earl.waite@gmail.com> 2015-08-20 08:48:02 -0600 Update findbugs maven plugin to 3.0.2 $ git whatchanged --no-abbrev -M --format="commit %H%ntree %T%nparent %P%nauthor %aN <%aE> %aI%ncommitter %cN <%cE> %cI%n%n%w(76,4,4)%s%n%n%b" commit 688eda2a898ba11e6173f75d8fbd19cc172abb6a tree 12a4ac27c0f153644daf083c7e1601644ac7ab17 parent d1da71b1f09f675af86b7fe1937d9c5f2740b182 author Mark Waite <mark.earl.waite@gmail.com> 2015-08-20T08:48:02-06:00 committer Mark Waite <mark.earl.waite@gmail.com> 2015-08-20T08:48:02-06:00 Update findbugs maven plugin to 3.0.2
With the lower-case "i" we're not getting ISO8601 and it's not parsing in: https://github.com/jenkinsci/git-plugin/blob/master/src/main/java/hudson/plugins/git/GitChangeSet.java#L213-L216