legal git branch names

Upload: wincentc

Post on 10-Apr-2018

218 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/8/2019 Legal Git Branch Names

    1/3

    Wincent Software for your Mac

    ProductsDesktop products

    Synergy

    Synergy AdvanceWinSwitch

    Developer productsatosymCommand-THextrapolateInstallWalrus

    WalratWincent Login ToolWincent Strings UtilityWOPublicWOTest

    Server productsBanssheeWikitext

    BlogSnippets

    TweetsWikiForumsSupportAboutSearchlog in

    Home Wiki Legal Git branch names

    Legal Git branch names4 weeks ago by Wincent Colaiuta

    Overview

    A Git branch name can not:

    Have a path component that begins with "."

    Have a double dot ".."Have an ASCII control character, "~", "^", ":" or SP, anywhereEnd with a "/"End with ".lock"Contain a "\" (backslash)

  • 8/8/2019 Legal Git Branch Names

    2/3

    Source: http://www.spinics.net/lists/git/msg133704.html

    Source code

    The definitive reference for what is a legal ref name (ie. applies to both tags and branches) is the

    implementation of the check_ref_format() function in refs.c, along with bad_ref_char() in thesame file. At the current time of writing (19 September 2010) they read as follows:

    static inline int bad_ref_char(int ch){

    if (((unsigned) ch)

  • 8/8/2019 Legal Git Branch Names

    3/3

    }level++;if (!ch) {

    if (ref