Bug 472455 - update JGit to 4.0.1
Summary: update JGit to 4.0.1
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Tycho (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Jan Sievers CLA
QA Contact:
URL:
Whiteboard:
Keywords: contributed
Depends on:
Blocks:
 
Reported: 2015-07-13 03:44 EDT by Jan Sievers CLA
Modified: 2021-04-28 16:52 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Sievers CLA 2015-07-13 03:44:13 EDT
Fedora build would like to update to the newest JGit version (just for build  reasons)

Looking at the bugs targeted for 4.0.1, I wonder if we should rather use 4.0.1

https://bugs.eclipse.org/bugs/buglist.cgi?bug_severity=blocker&bug_severity=critical&bug_severity=major&classification=Technology&list_id=12202000&product=JGit&query_format=advanced&resolution=---&resolution=FIXED&target_milestone=---&target_milestone=4.0.1&version=unspecified
Comment 1 Alexander Kurtakov CLA 2015-07-13 04:17:57 EDT
Going straight to 4.0.1 seems the best option. Updated summary to reflect that.
Comment 3 Jan Sievers CLA 2015-07-13 04:50:43 EDT
thanks for the patch!
Comment 4 Jan Sievers CLA 2015-10-28 04:26:37 EDT
this seems to have caused bug 480588

Unless we can't fix it very quickly I will probably revert the commit because there is no critical bugfix or new functionality in the new JGit version (release is pending this Friday)
Comment 5 Alexander Kurtakov CLA 2015-10-28 04:43:44 EDT
Is there a simple to use reproducer someone has already?
Comment 6 Jan Sievers CLA 2015-10-28 06:13:01 EDT
(In reply to Alexander Kurtakov from comment #5)
> Is there a simple to use reproducer someone has already?

no but bug 480588 has some details. I guess sth went wrong with the pathfilter. may be related to git submodules as the eclipse platform build uses submodules.
Comment 7 Jan Sievers CLA 2015-10-29 04:03:42 EDT
it looks like there is a change in JGit w.r.t. git status for repos using git submodules. (I will check with my local JGit guru)

Using jgit 3.5.3.201412180710-r, untracked changes in submodules were either not reported or filtered out correctly by our path filter. With jgit 4.0.1.201506240215-r, untracked changes in submodules are (correctly) reported, but we fail to filter them out for paths we are not interested in.

Background: we do a 'git status' to find out if the module being built is dirty just before the build of the module starts. We filter using a TreeFilter doing treeWalk.isPathPrefix() [1] only for the module we are interested in. Looks like this fails to filter out changes in other submodules now.

This is kind of a corner case because really the build should not create any dirt, whether in other submodules or not and David found a workaround using gitignore, (and we are very late in the release staging process), so I will not revert for now.
Last resort workaround is to switch off checking git status for dirt by using
jgit.dirtyWorkingTree=ignore [2]

 
Nevertheless it's a bug (probably in tycho's path filtering code) that should be fixed in 0.25.0, so I opened bug 480951

[1] https://github.com/eclipse/tycho.extras/blob/master/tycho-buildtimestamp-jgit/src/main/java/org/eclipse/tycho/extras/buildtimestamp/jgit/PathFilter.java#L49
[2] https://wiki.eclipse.org/Tycho/Reproducible_Version_Qualifiers#Dirty_working_tree_behaviour
Comment 8 David Williams CLA 2015-10-29 04:14:35 EDT
[Well, I see you typed in the same conclusion at the same time I was typing ... but, I'll post my comments anyway, in case it makes you reset easier. :) ]
= = = =

I appreciate your caution. And perhaps a revert is wise in case there are other problems yet to be discovered (since, "where there is smoke there is fire"?) 

But, to be honest, I would not revert just due to bug 480588. There is a workaround for that one (a couple, actually) and your "3.5" version is getting preeetttty old.  I am assuming you would open another bug, say, "dirt checker is needlessly aggressive", and fix that in your next release? 

So, up to you, of course, but, just thought I'd give you one consumer's point of view.