def completeFilename(self, commit, text):
        # Don't use os.path.split() or dirname() here, since that performs
        # some canonicalization like stripping out extra slashes.  We need to
        # return matches that with the exact text specified.
        idx = text.rfind(os.path.sep)
        if idx < 0:
            dirname = ''
            basename = text
        else:
            dirname = text[:idx+1]
            basename = text[idx+1:]

        # Expand commit name aliases
        commit = self.review.expandCommitName(commit)
        matches = []
        try:
            tree_entries = self.repoCache.listTree(commit, dirname)
        except OSError, ex:
            return []

        for entry in tree_entries:
            if entry.name.startswith(basename):
                matches.append(entry)

        # If there is only 1 match, and it is a blob, add a space
        # TODO: It would be nicer to honor user's inputrc settings
        if len(matches) == 1 and matches[0].type == git.OBJ_BLOB:
            return [dirname + matches[0].name + ' ']

        string_matches = []
        for entry in matches:
            full_match = dirname + entry.name
            if entry.type == git.OBJ_TREE:
                full_match += os.path.sep
            string_matches.append(full_match)

        return string_matches
Main function
dataset/ETHPy150Open facebookarchive/git-review/src/gitreview/review/cli_reviewer.py/CliReviewer.completeFilename--crossover with--dataset/ETHPy150Open opencolorado/OpenColorado-Tools-and-Utilities/Scripts/ArcGIS/10.0/Python/PublishOpenDataset.py/main