This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import re | |
import subprocess | |
def blame_and_add(filepath): | |
def find_author(blame_line): | |
match = re.compile( | |
'\((.*?)\s*[0-9]{4}' | |
).search(blame_line) | |
author = match.group() | |
return author.strip('( 0123456789') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import shutil | |
import subprocess | |
filenames, _ = subprocess.Popen( | |
['git', 'ls-files'], | |
stdout=subprocess.PIPE, | |
stderr=subprocess.PIPE | |
).communicate() |
NewerOlder