Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect hiderefs Behavior #109

Open
joelthompson opened this issue Nov 8, 2024 · 1 comment
Open

Incorrect hiderefs Behavior #109

joelthompson opened this issue Nov 8, 2024 · 1 comment

Comments

@joelthompson
Copy link

Version

master

Operating System

Linux/Unix

Bug description

According to the Git documentation, there are three ways hideRefs can be set:

  1. transfer.hideRefs: This hides the refs from both receive-pack and upload-pack commands
  2. uploadpack.hideRefs: This hides the ref from only upload-pack but leaves it visible for receive-pack commands
  3. receive.hideRefs: The opposite of the above: hide the ref only from receive-pack commands but leave it visible for upload-pack commands.

JGit only looks at uploadpack.hiderefs and ignores transfer.hiderefs and receive.hiderefs

hideRefs = rc.getStringList("uploadpack", null, "hiderefs");
Further, when uploadpack.hiderefs is set; JGit acts as if transfer.hiderefs had been set instead and hides the listed refs from both receive-pack and upload-pack.

The net result of this is there's no way to use hideRefs to hide a ref from only upload-pack or receive-pack.

Actual behavior

transfer.hiderefs and receive.hiderefs are both ignored; uploadpack.hiderefs acts the way transfer.hiderefs should.

Expected behavior

transfer.hiderefs, receive.hiderefs, and uploadpack.hiderefs to behave as describe in the Git documentation.

Relevant log output

No response

Other information

Not sure it's material, but the Git docs specify hideRefs with a capital R while JGit looks at hiderefs with a lower-case r

@msohn
Copy link
Member

msohn commented Nov 9, 2024

git config keys are case insensitive

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants