<commit_before>let s:save_cpo = &cpo
set cpo&vim


let s:D = gita#utils#import('Data.Dict')
let s:A = gita#utils#import('ArgumentParser')


let s:parser = s:A.new({
      \ 'name': 'Gita[!] checkout',
      \ 'description': 'Checkout a branch or paths to the working tree',
      \})
call s:parser.add_argument(
      \ '--quiet', '-q',
      \ 'Quiet, suppress feedback messages.',
      \)
call s:parser.add_argument(
      \ '--force', '-f', [
      \   'When switching branches, proceed even if the index or the working tree differs from HEAD. This is used to throw away local changes.',
      \   'When checking out paths from the index, do not fail upon unmerged entries; instead, unmerged entries are ignored.',
      \])
call s:parser.add_argument(
      \ '--ours', [
      \   'When checking out paths from the index, check out stage #2 from unmerged path.',
      \ ]
      \,{
      \   'conflicts': ['theirs'],
      \})
call s:parser.add_argument(
      \ '--theirs', [
      \   'When checking out paths from the index, check out stage #3 from unmerged path.',
      \ ]
      \,{
      \   'conflicts': ['ours'],
      \})
call s:parser.add_argument(
      \ '-b', [
      \   'Create a new branch with a specified name and start it at <start_point>.',
      \ ], {
      \   'kind': s:A.kinds.value,
      \   'conflicts': ['B', 'orphan'],
      \})
call s:parser.add_argument(
      \ '-B', [
      \   'Create a new branch with a specified name and start it at <start_point>.',
      \   'If it already exists, then reset it to <start_point>.',
      \ ], {
      \   'kind': s:A.kinds.value,
      \   'conflicts': ['b', 'orphan'],
      \})
call s:parser.add_argument(
      \ '--track', '-t', [
      \   'When creating a new branch set up "upstream" configuration.',
      \ ], {
      \   'conflicts': ['--no-track'],
      \})
call s:parser.add_argument(
      \ '--no-track', [
      \   'Do not set up "upstream" configuration, even if the branch.autosetupmerge configuration variable is true.',
      \ ], {
      \   'conflicts': ['--track'],
      \})
call s:parser.add_argument(
      \ '-l', [
      \   'Create the new branch''s reflog.',
      \])
call s:parser.add_argument(
      \ '--detach', [
      \   'Rather than checking out a branch to work on it, check out a commit for inspection and discardable experiments.',
      \   'This is the default behavior of "git checkout <commit>" when <commit> is not a branch name.',
      \])
call s:parser.add_argument(
      \ '--orphan', [
      \   'Create a new orphan branch, started from <start_point> and switch to it. The first commit made on this new branch will have no parents',
      \   'and it will be the root of a new history totally disconnected from all the other branches and commits.',
      \ ], {
      \   'kind': s:A.kinds.value,
      \   'conflicts': ['b', 'B'],
      \})
call s:parser.add_argument(
      \ 'commit', [
      \   '<branch> to checkout or <start_point> of a new branch or <tree-ish> to checkout from.',
      \ ], {
      \   'complete': function('gita#completes#complete_remote_branch'),
      \ })
function! s:parser.hooks.post_complete_optional_argument(candidates, options) abort " {{{
  let candidates = extend(
        \ gita#completes#complete_staged_files('', '', [0, 0], a:options),
        \ gita#completes#complete_unstaged_files('', '', [0, 0], a:options),
        \ gita#completes#complete_conflicted_files('', '', [0, 0], a:options),<commit_msg>Fix feature/checkout undefined variable issue<commit_after>let s:save_cpo = &cpo
set cpo&vim


let s:D = gita#utils#import('Data.Dict')
let s:A = gita#utils#import('ArgumentParser')


let s:parser = s:A.new({
      \ 'name': 'Gita[!] checkout',
      \ 'description': 'Checkout a branch or paths to the working tree',
      \})
call s:parser.add_argument(
      \ '--quiet', '-q',
      \ 'Quiet, suppress feedback messages.',
      \)
call s:parser.add_argument(
      \ '--force', '-f', [
      \   'When switching branches, proceed even if the index or the working tree differs from HEAD. This is used to throw away local changes.',
      \   'When checking out paths from the index, do not fail upon unmerged entries; instead, unmerged entries are ignored.',
      \])
call s:parser.add_argument(
      \ '--ours', [
      \   'When checking out paths from the index, check out stage #2 from unmerged path.',
      \ ]
      \,{
      \   'conflicts': ['theirs'],
      \})
call s:parser.add_argument(
      \ '--theirs', [
      \   'When checking out paths from the index, check out stage #3 from unmerged path.',
      \ ]
      \,{
      \   'conflicts': ['ours'],
      \})
call s:parser.add_argument(
      \ '-b', [
      \   'Create a new branch with a specified name and start it at <start_point>.',
      \ ], {
      \   'type': s:A.types.value,
      \   'conflicts': ['B', 'orphan'],
      \})
call s:parser.add_argument(
      \ '-B', [
      \   'Create a new branch with a specified name and start it at <start_point>.',
      \   'If it already exists, then reset it to <start_point>.',
      \ ], {
      \   'type': s:A.types.value,
      \   'conflicts': ['b', 'orphan'],
      \})
call s:parser.add_argument(
      \ '--track', '-t', [
      \   'When creating a new branch set up "upstream" configuration.',
      \ ], {
      \   'conflicts': ['--no-track'],
      \})
call s:parser.add_argument(
      \ '--no-track', [
      \   'Do not set up "upstream" configuration, even if the branch.autosetupmerge configuration variable is true.',
      \ ], {
      \   'conflicts': ['--track'],
      \})
call s:parser.add_argument(
      \ '-l', [
      \   'Create the new branch''s reflog.',
      \])
call s:parser.add_argument(
      \ '--detach', [
      \   'Rather than checking out a branch to work on it, check out a commit for inspection and discardable experiments.',
      \   'This is the default behavior of "git checkout <commit>" when <commit> is not a branch name.',
      \])
call s:parser.add_argument(
      \ '--orphan', [
      \   'Create a new orphan branch, started from <start_point> and switch to it. The first commit made on this new branch will have no parents',
      \   'and it will be the root of a new history totally disconnected from all the other branches and commits.',
      \ ], {
      \   'type': s:A.types.value,
      \   'conflicts': ['b', 'B'],
      \})
call s:parser.add_argument(
      \ 'commit', [
      \   '<branch> to checkout or <start_point> of a new branch or <tree-ish> to checkout from.',
      \ ], {
      \   'complete': function('gita#completes#complete_remote_branch'),
      \ })
function! s:parser.hooks.post_complete_optional_argument(candidates, options) abort " {{{
  let candidates = extend(
        \ gita#completes#complete_staged_files('', '', [0, 0], a:options),
        \ gita#completes#complete_unstaged_files('', '', [0, 0], a:options),
        \ gita#completes#complete_conflicted_files('', '', [0, 0], a:options),
{'fraction_non_alphanumeric': 0.15566037735849056, 'fraction_numerical': 0.002287021154945683, 'mean_word_length': 2.347846889952153, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 21, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '651786', 'n_tokens_mistral': 2261, 'n_tokens_neox': 2184, 'n_words': 679}