summaryrefslogtreecommitdiff
path: root/git-parse-remote.sh
diff options
context:
space:
mode:
authorLibravatar Jonathan Nieder <jrnieder@gmail.com>2011-02-08 04:34:34 -0600
committerLibravatar Junio C Hamano <gitster@pobox.com>2011-02-08 11:14:26 -0800
commitf8bd36a433768f1b11642faff5b88e3510aa8af8 (patch)
treeb2af33785acca45118e2004102edb8693c423c88 /git-parse-remote.sh
parentcheckout: introduce --detach synonym for "git checkout foo^{commit}" (diff)
downloadtgif-f8bd36a433768f1b11642faff5b88e3510aa8af8.tar.xz
checkout: rearrange update_refs_for_switch for clarity
Take care of simple, exceptional cases before the meat of the "check out by branch name" code begins. After this change, the function vaguely follows the following pseudocode: if (-B or -b) create branch; if (plain "git checkout" or "git checkout HEAD") ; else if (--detach or checking out by non-branch commit name) detach HEAD; else if (checking out by branch name) attach HEAD; One nice side benefit is to make it possible to remove handling of the --detach option from outside switch_branches. Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-parse-remote.sh')
0 files changed, 0 insertions, 0 deletions