def BuildGitDiffCmd(diff_type, upstream_commit, args):
    'Generates a diff command.'
    diff_cmd = ['diff', '--no-ext-diff', '--no-prefix', diff_type, upstream_commit, '--']
    if args:
        for arg in args:
            if (os.path.isdir(arg) or os.path.isfile(arg)):
                diff_cmd.append(arg)
            else:
                DieWithError(('Argument "%s" is not a file or a directory' % arg))
    return diff_cmd
Generates a diff command.
def BuildGitDiffCmd(diff_type, upstream_commit, args):
    
    diff_cmd = ['diff', '--no-ext-diff', '--no-prefix', diff_type, upstream_commit, '--']
    if args:
        for arg in args:
            if (os.path.isdir(arg) or os.path.isfile(arg)):
                diff_cmd.append(arg)
            else:
                DieWithError(('Argument "%s" is not a file or a directory' % arg))
    return diff_cmd