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

[WARNING] unknown commit-graph chunk: 0x47444132 #12

Open
TheSnoozer opened this issue Jan 4, 2024 · 1 comment
Open

[WARNING] unknown commit-graph chunk: 0x47444132 #12

TheSnoozer opened this issue Jan 4, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@TheSnoozer
Copy link

TheSnoozer commented Jan 4, 2024

Version

6.7.0.202309050840-r

Operating System

MacOS

Bug description

When running the git-commit-id-maven-plugin (which uses jgit under the hood) a warning about unknown commit-graph chunk is reported.

This warning seems to only be reproducible under mac using a

Apache Maven 3.9.6 (bc0240f3c744dd6b6ec2920b3cd08dcc295161ae)
Maven home: /Users/khm/tools/maven
Java version: 21.0.1, vendor: Oracle Corporation, runtime: /Users/khm/.sdkman/candidates/java/21.0.1-open
Default locale: en_DE, platform encoding: UTF-8
OS name: "mac os x", version: "14.0", arch: "aarch64", family: "mac"

The message templates are defined in:

org.eclipse.jgit/resources/org/eclipse/jgit/internal/JGitText.properties:commitGraphChunkUnknown=unknown commit-graph chunk: 0x{0}

and the error observed comes from:

LOG.warn(MessageFormat.format(
JGitText.get().commitGraphChunkUnknown,
Integer.toHexString(chunkId)));
.

Actual behavior

When running jgit a warning about an unknown commit-graph chunk is reported:

[INFO] --- git-commit-id:7.0.0:revision (default) @ tree ---
[WARNING] unknown commit-graph chunk: 0x47444132
[WARNING] unknown commit-graph chunk: 0x47444132
[WARNING] unknown commit-graph chunk: 0x47444132
[WARNING] unknown commit-graph chunk: 0x47444132

Expected behavior

No warning.

Relevant log output

No response

Other information

To reproduce checkout the branch https://github.com/khmarbaise/maven-it-extension/tree/git-commit-id-maven-plugin-issue-687
and run mvn clean verify.

Can be reproduced using:

  • Maven 4.0.0-alpha-10
Apache Maven 4.0.0-alpha-10 (89d3c0321dda868c432edf504f1884e6fd706f00)
Maven home: /Users/khm/tools/maven
Java version: 21.0.1, vendor: Oracle Corporation, runtime: /Users/khm/.sdkman/candidates/java/21.0.1-open
Default locale: en_DE, platform encoding: UTF-8
OS name: "mac os x", version: "14.0", arch: "aarch64", family: "mac"
  • Maven 3.9.6
Apache Maven 3.9.6 (bc0240f3c744dd6b6ec2920b3cd08dcc295161ae)
Maven home: /Users/khm/tools/maven
Java version: 21.0.1, vendor: Oracle Corporation, runtime: /Users/khm/.sdkman/candidates/java/21.0.1-open
Default locale: en_DE, platform encoding: UTF-8
OS name: "mac os x", version: "14.0", arch: "aarch64", family: "mac"
  • Maven 3.8.8
mvn --version
Apache Maven 3.8.8 (4c87b05d9aedce574290d1acc98575ed5eb6cd39)
Maven home: /Users/khm/tools/maven
Java version: 21.0.1, vendor: Oracle Corporation, runtime: /Users/khm/.sdkman/candidates/java/21.0.1-open
Default locale: en_DE, platform encoding: UTF-8
OS name: "mac os x", version: "14.0", arch: "aarch64", family: "mac"

Can not be reproduced under linux and the same repository/branch/commit.

original bug-report: git-commit-id/git-commit-id-maven-plugin#687

@TheSnoozer
Copy link
Author

TheSnoozer commented Jan 5, 2024

I found more context on this.

Jgit's constants are defined here:

static final int COMMIT_GRAPH_MAGIC = 0x43475048; /* "CGPH" */
static final int CHUNK_ID_OID_FANOUT = 0x4f494446; /* "OIDF" */
static final int CHUNK_ID_OID_LOOKUP = 0x4f49444c; /* "OIDL" */
static final int CHUNK_ID_COMMIT_DATA = 0x43444154; /* "CDAT" */
static final int CHUNK_ID_EXTRA_EDGE_LIST = 0x45444745; /* "EDGE" */
static final int CHUNK_ID_BLOOM_FILTER_INDEX = 0x42494458; /* "BIDX" */
static final int CHUNK_ID_BLOOM_FILTER_DATA = 0x42444154; /* "BDAT" */

This 0x47444132 seems to come from
https://github.com/git/git/blob/a26002b62827b89a19b1084bd75d9371d565d03c/commit-graph.c#L48-L49 and is simply not listed as magic value in jgit.

It was introduced with this change:
git/git@6dbf4b8

I found the relevant references on this discussion

@tomaswolf tomaswolf added the bug Something isn't working label Feb 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants