Skip to content
GitLab
    • GitLab: the DevOps platform
    • Explore GitLab
    • Install GitLab
    • How GitLab compares
    • Get started
    • GitLab docs
    • GitLab Learn
  • Pricing
  • Talk to an expert
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
    • Switch to GitLab Next
    Projects Groups Topics Snippets
  • Register
  • Sign in
  • TortoiseGit TortoiseGit
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
    • Locked files
  • Issues 382
    • Issues 382
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 16
    • Merge requests 16
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Artifacts
    • Schedules
    • Test cases
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • TortoiseGitTortoiseGit
  • TortoiseGitTortoiseGit
  • Issues
  • #3121
Closed
Open
Issue created Dec 13, 2017 by Yves Goergen@ygoe

Create shorter branch names when checking out a commit

When checking out a specific commit through the Log window, I am offered a new branch for the checkout to avoid the dangling HEAD issue. This branch name is automatically generated like "Branch_". The commit ID is unshortened and 40 characters long. Nobody uses 40 char long hashes in reality. I've heard that even for the Linux kernel a hash length of some 11 is currently sufficient to be unique.

So what about creating shorter branch names here? The length should probably be determined from the existing commit IDs and be set to whatever length is unique in the current repository. But probably no less than 6 chars. This minimum unique length could be cached for faster access, and the cache could be invalidated whenever any commit (or any object, depending on the scope of the value) in the repository changes.

It would make branch names a lot shorter, reducing the amount of noise.

Edited Dec 20, 2017 by Sven Strickroth
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking