summaryrefslogtreecommitdiff
path: root/builtin/revert.c
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2012-08-30 12:45:50 (GMT)
committerJunio C Hamano <gitster@pobox.com>2012-09-11 18:49:31 (GMT)
commitb6312c27a06f31625d915d44531d5e728ffd8d63 (patch)
treed19ceaa82ba5ff322fa5495951e2ad04c395a30e /builtin/revert.c
parente51e30577a9056f5ae7195c694a00ee71200a9d5 (diff)
downloadgit-b6312c27a06f31625d915d44531d5e728ffd8d63.zip
git-b6312c27a06f31625d915d44531d5e728ffd8d63.tar.gz
git-b6312c27a06f31625d915d44531d5e728ffd8d63.tar.bz2
checkout: reorder option handling
checkout operates in three different modes. On top of that it tries to be smart by guessing the branch name for switching. This results in messy option handling code. This patch reorders it so that - cmd_checkout() is responsible for parsing, preparing input and determining mode - Code of each mode is in checkout_paths() and checkout_branch(), where sanity checks are performed Another slight improvement is always print branch name (or commit name) when printing errors related ot them. This helps catch the case where an option is mistaken as branch/commit. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/revert.c')
0 files changed, 0 insertions, 0 deletions