Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 327412

Summary: diff.renames config value doesn't support non-boolean values: diff.renames=copies
Product: [Technology] JGit Reporter: Ben Mellor <hyarion>
Component: JGitAssignee: Project Inbox <jgit.core-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: matthias.sohn, mikko.rantalainen, robin.rosenberg, stefan.lay
Version: 0.9.0   
Target Milestone: 0.11   
Hardware: PC   
OS: Linux   
Whiteboard:

Description Ben Mellor CLA 2010-10-10 20:52:27 EDT
Build Identifier: M20100211-1343

Trying to view the history view of a git-controlled resource in the egit history view fails and displays a "Problem Occurred" pop-up. The details in the error pop-up are:

An error has occurred. See error log for more details.
Invalid boolean value: diff.renames=copies

I'm using a gitconfig file that was written for console git operation. The value of diff.renames is not supposed to be limited to boolean values; from the git documentation (http://www.kernel.org/pub/software/scm/git/docs/git-config.html):

diff.renames
Tells git to detect renames. If set to any boolean value, it will enable basic rename detection. If set to "copies" or "copy", it will detect copies, as well.

I'm not requesting that egit actually support copy detection if it doesn't, but it would be nice if it could just treat "copies" or "copy" as true instead of barfing, since the user is asking for a "superset" of the functionality provided by diff.renames=true.

Reproducible: Always

Steps to Reproduce:
1. Right-click on a git-controlled resource, select Team -> Show in History
Comment 1 Ben Mellor CLA 2010-11-14 18:00:50 EST
I would argue that an error reading a perfectly valid config file which prevents any use of the history views is in fact a bug and not an "enhancement" issue. *shrugs*
Comment 2 Mikko Rantalainen CLA 2011-01-05 09:08:16 EST
Still broken with EGit 0.9.1. Definitely a bug and not an enhancement.

Perhaps the product should be "JGit" to make correct people to see this bug?
Comment 3 Robin Rosenberg CLA 2013-04-07 18:48:37 EDT
Fixed in 0.10.1