aboutsummaryrefslogtreecommitdiff
blob: f5f448c499e16b2a6b35c6a4ca81dd34d1ee4bf5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
"""
Filesystem utils
"""
import os

def strip_prefix(string, prefix):
    """Returns a string, stripped from its prefix"""
    if string.startswith(prefix):
        return string[len(prefix):]
    else
        return string

def remove_file(repo, dst):
    repo.index.remove(dst)
    os.remove(dst)