diff options
author | Nguyễn Thái Ngọc Duy <pclouds@gmail.com> | 2012-08-30 19:45:50 +0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2012-09-11 11:49:31 -0700 |
commit | b6312c27a06f31625d915d44531d5e728ffd8d63 (patch) | |
tree | d19ceaa82ba5ff322fa5495951e2ad04c395a30e /t/t9163-git-svn-reset-clears-caches.sh | |
parent | checkout: move more parameters to struct checkout_opts (diff) | |
download | tgif-b6312c27a06f31625d915d44531d5e728ffd8d63.tar.xz |
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 't/t9163-git-svn-reset-clears-caches.sh')
0 files changed, 0 insertions, 0 deletions