Community
Participate
Working Groups
I recently used the Gitflow support in eclipse to release a project. I thought it had all worked fine - until a while later, I noticed that GitBlit was now broken: https://groups.google.com/forum/#!topic/gitblit/Gdk_HjjPBTk It turns out, that the gitflow release created the release tag without specifying a time or a date. Here is a tag from a release done by JGitFlow: me@overkill:/mnt/STORAGE/Work/project git show 3.04 tag 3.04 Tagger: ci-server <ci-server@myserver.com> Date: Fri May 13 08:44:38 2016 -0400 [...] And here is the tag created by the eclipse gitflow plugin: me@overkill:/mnt/STORAGE/Work/project git show 1.0 tag 1.0 [...] While it is a bug for GitBlit to break when these are missing, it seems like Tagger and Date should be populated when creating a tag.
what is the output of $ git cat-file -t 1.0 I tried creating a release using EGit gitflow using current master and found it's creating an annotated tag containing tagger and timestamp information. As I wasn't able to reproduce your problem, can you provide steps to reproduce ?
Hmm, Maybe its already fixed in a newer env. My version is still Java implementation of Git 4.1.1.201511131810-r org.eclipse.jgit.feature.group Eclipse JGit I simply did: Init Gitflow Start Release Finish Release And now, command line git shows: darmbrust@overkill:/mnt/STORAGE/Work/project$ git show 1.0.1 tag 1.0.1 Release of 1.0.1 commit f803a3bcf1077db7a2e262cf906cbc280dd0f6c4 Merge: 0f3559d 2fe5638 Author: darmbrust <daniel.armbrust.list@gmail.com> Date: Fri Oct 28 09:30:30 2016 -0500 Merge branch 'release/1.0.1' darmbrust@overkill:/mnt/STORAGE/Work/project$ git cat-file -t 1.0.1 tag darmbrust@overkill:/mnt/STORAGE/Work/project$ I can reproduce it at will with this version.
(In reply to Daniel Armbrust from comment #2) > Hmm, > Maybe its already fixed in a newer env. > > My version is still > Java implementation of Git 4.1.1.201511131810-r > org.eclipse.jgit.feature.group Eclipse JGit > > I simply did: > Init Gitflow > Start Release > Finish Release > > And now, command line git shows: > darmbrust@overkill:/mnt/STORAGE/Work/project$ git show 1.0.1 > tag 1.0.1 > > Release of 1.0.1 > commit f803a3bcf1077db7a2e262cf906cbc280dd0f6c4 > Merge: 0f3559d 2fe5638 > Author: darmbrust <daniel.armbrust.list@gmail.com> > Date: Fri Oct 28 09:30:30 2016 -0500 > > Merge branch 'release/1.0.1' > this shows EGit gitflow created an annotated tag containing tagger and timestamp > darmbrust@overkill:/mnt/STORAGE/Work/project$ git cat-file -t 1.0.1 > tag -> annotated tag > darmbrust@overkill:/mnt/STORAGE/Work/project$ > > I can reproduce it at will with this version. so I can't see a problem with this tag 1.0.1
Another reason could be a bug in gitblit if it fails to parse the annotated tag's object body. When loading an object e.g. from a RevWalk JGit by default only loads the object's ID, if you want to access any fields you have to ensure to first run one of the parseXXX methods of RevWalk, e.g. parseTag, parseBody, parseHeader, peel otherwise those fields aren't loaded but null.
(In reply to Matthias Sohn from comment #3) > (In reply to Daniel Armbrust from comment #2) > > Hmm, > > Maybe its already fixed in a newer env. > > > > My version is still > > Java implementation of Git 4.1.1.201511131810-r > > org.eclipse.jgit.feature.group Eclipse JGit > > > > I simply did: > > Init Gitflow > > Start Release > > Finish Release > > > > And now, command line git shows: > > darmbrust@overkill:/mnt/STORAGE/Work/project$ git show 1.0.1 > > tag 1.0.1 > > > > Release of 1.0.1 > > commit f803a3bcf1077db7a2e262cf906cbc280dd0f6c4 > > Merge: 0f3559d 2fe5638 > > Author: darmbrust <daniel.armbrust.list@gmail.com> > > Date: Fri Oct 28 09:30:30 2016 -0500 > > > > Merge branch 'release/1.0.1' > > > > this shows EGit gitflow created an annotated tag containing tagger and > timestamp > > > darmbrust@overkill:/mnt/STORAGE/Work/project$ git cat-file -t 1.0.1 > > tag > > -> annotated tag > > > darmbrust@overkill:/mnt/STORAGE/Work/project$ > > > > I can reproduce it at will with this version. > > so I can't see a problem with this tag 1.0.1 I'm not sure on the difference between an annotated tag and a tag... but when I let JGitFlow do the process, it produces a tag that looks like this: darmbrust@overkill:/mnt/STORAGE/Work/otherProject$ git show 3.04 tag 3.04 Tagger: ci-server <ci-server@myserver.com> Date: Fri May 13 08:44:38 2016 -0400 [jgitflow-plugin]tagging release 3.04 commit f2499e141998885f4e0127c532fcd43e8be2ed5a Merge: 29fea0f c784404 Author: ci-server <ci-server@myserver.com> Date: Fri May 13 08:44:38 2016 -0400 Merge branch 'release/3.04' darmbrust@overkill:/mnt/STORAGE/Work/otherProject$ git cat-file -t 3.04 tag darmbrust@overkill:/mnt/STORAGE/Work/otherProject$ As you can see, this contains a "Tagger" and "Date" field, which are not present in the tag that the Eclipse gitflow integration created.
New Gerrit change created: https://git.eclipse.org/r/84150
you are right the gitflow bundle didn't set PersonIdent which causes tagger and timestamp to be unset, pushed a fix for review
Gerrit change https://git.eclipse.org/r/84150 was merged to [stable-4.5]. Commit: http://git.eclipse.org/c/egit/egit.git/commit/?id=fca4b977171a4f510def0b20a5d9b4f5506df6c8