Bug 551664 - Unsupported "always" value for "core.logAllRefUpdates" configuration key
Summary: Unsupported "always" value for "core.logAllRefUpdates" configuration key
Status: RESOLVED FIXED
Alias: None
Product: JGit
Classification: Technology
Component: JGit (show other bugs)
Version: 5.5   Edit
Hardware: PC Linux
: P3 normal with 1 vote (vote)
Target Milestone: 5.6   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-10-01 07:50 EDT by Sebastian Schuberth CLA
Modified: 2019-10-07 13:07 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sebastian Schuberth CLA 2019-10-01 07:50:56 EDT
cgit supports "always" for "core.logAllRefUpdates" so that "a missing reflog is automatically created for any ref", see https://git-scm.com/docs/git-config#Documentation/git-config.txt-corelogAllRefUpdates.

JGit, on the other hand, seems to expect "core.logAllRefUpdates" to be a boolean value, see https://github.com/eclipse/jgit/blob/v5.5.0.201909110433-r/org.eclipse.jgit/src/org/eclipse/jgit/lib/CoreConfig.java#L174.

This results in an exception like

java.lang.IllegalArgumentException: Invalid boolean value: core.logallrefupdates=always

when running commands like "describe" for users that have "core.logallrefupdates=always" in "~/.gitconfig".
Comment 1 Thomas Wolf CLA 2019-10-01 08:30:43 EDT
Looks like "always" was added in C git in 2017. It isn't implemented at all in JGit. Besides handling parsing it in CoreConfig, at least ReflogWriter (honoring "always") and TagOperation (set the reflog messsage) would need changes to actually do something with the "always" value.
Comment 2 Eclipse Genie CLA 2019-10-07 11:36:03 EDT
Gerrit change https://git.eclipse.org/r/150504 was merged to [master].
Commit: http://git.eclipse.org/c/jgit/jgit.git/commit/?id=b87f1259d679c7af83b7fd1ab148c99c613beaf0