<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

def _which_git_config(global_, cwd, user, password, output_encoding=None):
    '''
    Based on whether global or local config is desired, return a list of CLI
    args to include in the git config command.
    '''
    if global_:
        return ['--global']
    version_ = _LooseVersion(version(versioninfo=False))
    if version_ >= _LooseVersion('1.7.10.2'):
        # --local added in 1.7.10.2
        return ['--local']
    else:
        # For earlier versions, need to specify the path to the git config file
        return ['--file', _git_config(cwd, user, password,
                                      output_encoding=output_encoding)]