git-export-patches 623 B

1234567891011121314151617181920212223242526
  1. #!/usr/bin/env python
  2. import argparse
  3. import os
  4. import re
  5. import subprocess
  6. import sys
  7. from lib import git
  8. def main(argv):
  9. parser = argparse.ArgumentParser()
  10. parser.add_argument("-o", "--output",
  11. help="directory into which exported patches will be written",
  12. required=True)
  13. parser.add_argument("patch_range",
  14. nargs='?',
  15. help="range of patches to export. Defaults to all commits since the "
  16. "most recent tag or remote branch.")
  17. args = parser.parse_args(argv)
  18. git.export_patches('.', args.output, patch_range=args.patch_range)
  19. if __name__ == '__main__':
  20. main(sys.argv[1:])