Skip to content
  • Junio C Hamano's avatar
    Merge branch 'jh/checkout-auto-tracking' · 77eb44b8
    Junio C Hamano authored
    Update "git checkout foo" that DWIMs the intended "upstream" and
    turns it into "git checkout -t -b foo remotes/origin/foo" to
    correctly take existing remote definitions into account.
    
    The remote "origin" may be what uniquely map its own branch to
    remotes/some/where/foo but that some/where may not be "origin".
    
    * jh/checkout-auto-tracking:
      glossary: Update and rephrase the definition of a remote-tracking branch
      branch.c: Validate tracking branches with refspecs instead of refs/remotes/*
      t9114.2: Don't use --track option against "svn-remote"-tracking branches
      t7201.24: Add refspec to keep --track working
      t3200.39: tracking setup should fail if there is no matching refspec.
      checkout: Use remote refspecs when DWIMming tracking branches
      t2024: Show failure to use refspec when DWIMming remote branch names
      t2024: Add tests verifying current DWIM behavior of 'git checkout <branch>'
    77eb44b8