git-commit-vandalism/builtin
Nguyễn Thái Ngọc Duy b6312c27a0 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>
2012-09-11 11:49:31 -07:00
..
add.c Merge branch 'ar/clone-honor-umask-at-top' into maint 2012-07-22 13:04:05 -07:00
annotate.c
apply.c Merge branch 'pg/maint-apply-remove-unused-variable' 2012-08-22 11:51:33 -07:00
archive.c
bisect--helper.c
blame.c Merge branch 'jk/maint-null-in-trees' 2012-08-27 11:54:28 -07:00
branch.c branch: remove lego in i18n tracking info strings 2012-05-04 09:12:24 -07:00
bundle.c
cat-file.c Merge branch 'jk/maint-null-in-trees' 2012-08-27 11:54:28 -07:00
check-attr.c Merge branch 'bc/attr-ignore-case' 2011-10-17 21:37:14 -07:00
check-ref-format.c
checkout-index.c
checkout.c checkout: reorder option handling 2012-09-11 11:49:31 -07:00
clean.c
clone.c Merge branch 'ar/clone-honor-umask-at-top' into maint 2012-07-22 13:04:05 -07:00
column.c Add column layout skeleton and git-column 2012-04-27 09:26:37 -07:00
commit-tree.c Merge branch 'kk/maint-commit-tree' 2012-07-23 20:55:54 -07:00
commit.c Merge branch 'jk/maint-commit-check-committer-early' 2012-07-24 14:05:18 -07:00
config.c config: fix several access(NULL) calls 2012-07-16 09:59:06 -07:00
count-objects.c
credential.c git credential fill: output the whole 'struct credential' 2012-06-25 11:56:24 -07:00
describe.c
diff-files.c
diff-index.c
diff-tree.c
diff.c Merge branch 'jk/maint-null-in-trees' 2012-08-27 11:54:28 -07:00
fast-export.c Merge branch 'js/fast-export-paths-with-spaces' into maint 2012-07-22 13:00:45 -07:00
fetch-pack.c Merge branch 'jk/fetch-pack-remove-dups-optim' 2012-05-29 13:09:08 -07:00
fetch.c Merge branch 'mb/fetch-call-a-non-branch-a-ref' into maint 2012-05-03 15:29:25 -07:00
fmt-merge-msg.c Merge branch 'jc/fmt-merge-msg-people' 2012-06-12 08:33:30 -07:00
for-each-ref.c
fsck.c fsck: use streaming API for writing lost-found blobs 2012-03-07 09:07:39 -08:00
gc.c gc: use argv-array for sub-commands 2012-04-18 16:17:42 -07:00
grep.c grep: add a grep.patternType configuration setting 2012-08-03 09:58:02 -07:00
hash-object.c
help.c Merge branch 'cw/help-over-network' 2012-07-09 09:02:19 -07:00
index-pack.c Merge branch 'jk/index-pack-streaming-fix' 2012-07-15 21:40:07 -07:00
init-db.c git on Mac OS and precomposed unicode 2012-07-08 22:03:46 -07:00
log.c Merge branch 'tr/maint-show-walk' into maint 2012-07-22 13:01:40 -07:00
ls-files.c path_excluded(): update API to less cache-entry centric 2012-06-05 21:22:36 -07:00
ls-remote.c
ls-tree.c
mailinfo.c
mailsplit.c
merge-base.c
merge-file.c remove superfluous newlines in error messages 2012-04-30 15:45:51 -07:00
merge-index.c
merge-ours.c
merge-recursive.c
merge-tree.c
merge.c Merge branch 'tr/void-diff-setup-done' 2012-08-22 11:52:27 -07:00
mktag.c
mktree.c
mv.c
name-rev.c
notes.c
pack-objects.c Merge branch 'jc/sha1-name-more' 2012-07-22 12:55:07 -07:00
pack-redundant.c
pack-refs.c
patch-id.c
prune-packed.c fix deletion of .git/objects sub-directories in git-prune/repack 2012-03-07 10:24:33 -08:00
prune.c fix deletion of .git/objects sub-directories in git-prune/repack 2012-03-07 10:24:33 -08:00
push.c Merge branch 'mm/push-default-switch-warning' 2012-08-27 11:54:04 -07:00
read-tree.c
receive-pack.c receive-pack: do not leak output from auto-gc to standard output 2012-08-06 22:31:10 -07:00
reflog.c reflog: remove i18n legos in pruning message 2012-06-07 11:49:16 -07:00
remote-ext.c
remote-fd.c
remote.c remote: fix typo 2012-05-20 18:48:10 -07:00
replace.c
rerere.c
reset.c Merge branch 'jc/sha1-name-more' 2012-07-22 12:55:07 -07:00
rev-list.c Merge branch 'jk/maint-reflog-walk-count-vs-time' into maint 2012-05-14 11:46:16 -07:00
rev-parse.c Merge branch 'jc/sha1-name-more' 2012-07-22 12:55:07 -07:00
revert.c Merge branch 'nh/empty-rebase' 2012-04-30 14:58:01 -07:00
rm.c
send-pack.c teach send-pack about --[no-]progress 2012-05-01 09:40:30 -07:00
shortlog.c
show-branch.c
show-ref.c
stripspace.c
symbolic-ref.c
tag.c ident: rename IDENT_ERROR_ON_NO_NAME to IDENT_STRICT 2012-05-24 17:16:41 -07:00
tar-tree.c
unpack-file.c
unpack-objects.c remove superfluous newlines in error messages 2012-04-30 15:45:51 -07:00
update-index.c Merge branch 'hv/submodule-update-nuke-submodules' into maint 2012-07-11 12:46:31 -07:00
update-ref.c
update-server-info.c update-server-info: respect core.bigfilethreshold 2012-03-07 09:07:39 -08:00
upload-archive.c
var.c ident: rename IDENT_ERROR_ON_NO_NAME to IDENT_STRICT 2012-05-24 17:16:41 -07:00
verify-pack.c
verify-tag.c verify-tag: Parse GPG configuration options. 2012-03-08 14:03:07 -08:00
write-tree.c