Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/python
- # -*- coding: utf-8 -*-
- from subprocess import call
- import sys
- if __name__ == '__main__':
- if len(sys.argv) == 1:
- old_n = 1
- new_n = 0
- elif len(sys.argv) == 2:
- old_n = int(sys.argv[1])
- new_n = 0
- else:
- old_n = int(sys.argv[1])
- new_n = int(sys.argv[2])
- old_commit = "HEAD" + "^"*old_n
- new_commit = "HEAD" + "^"*new_n
- call(["git", "diff", old_commit, new_commit])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement