Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Remove FileMode.getMode()
The octal value associated to `FileMode` is not very useful to users, since it is only used internally, when generating the tree id. Therefore we can probably remove the getter for now.
  • Loading branch information
ppkarwasz committed Apr 12, 2026
commit 508bfc576eb48b8a655fbce7f63a20a1ab8f64c1
15 changes: 0 additions & 15 deletions src/main/java/org/apache/commons/codec/digest/GitIdentifiers.java
Original file line number Diff line number Diff line change
Expand Up @@ -180,29 +180,14 @@ private static FileMode get(final Path path) {
return REGULAR;
}

/**
* The octal mode as used by Git.
*/
private final String mode;

/**
* Serialized {@code mode}: since this is mutable, it must remain private.
*/
private final byte[] modeBytes;

FileMode(final String mode) {
this.mode = mode;
this.modeBytes = mode.getBytes(StandardCharsets.US_ASCII);
}

/**
* Gets the octal mode as used by Git.
*
* @return The octal mode.
*/
public String getMode() {
return mode;
}
}

/**
Expand Down