Skip to content

Feature request: odd length accepted #1

Open

Description

@thenger

Why the restriction on length ?

# gitc0ffee --update-ref --prefix=eeeee
invalid prefix "eeeee": odd length hex encoded bytes: len(eeeee) = 5

Activity

  1. trichner commented on Jun 7, 2023

    @trichner
    Owner

    Good question! This is because one byte is encoded as two characters in hexadecimal. To support odd lengths one would need to be able to handle prefixes on half-bytes (nibbles).

    To avoid the complexity this is not supported for now. Feel free to open a PR though, it would make sense because most git clients show 7 characters (3.5 bytes prefix).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestquestionFurther information is requested

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions