Skip to content

Instantly share code, notes, and snippets.

@gerasiov gerasiov/
Created Nov 16, 2017

What would you like to do?
import sys
import subprocess
parents = filter(lambda p: p!='-p', sys.stdin.readline().split() )
output = []
for parent in parents:
result=subprocess.check_output(["git", "rev-list", parent] + map(lambda p: "^%s"%p, filter(lambda p: p != parent, parents)))
if result:
if len(output) == 0 and len(parents) != 0:
print(" ".join(map(lambda p: "-p %s"%p, output)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.