From 81179ca3aa6c8014e9c1814d36ea94681c0bbd21 Mon Sep 17 00:00:00 2001 From: Ilya Kulakov Date: Mon, 10 Feb 2020 01:43:49 +0600 Subject: [PATCH] Tweak the help message and README. --- README.rst | 24 ++++++++++++++---------- git_archive_all.py | 17 ++++++++--------- 2 files changed, 22 insertions(+), 19 deletions(-) diff --git a/README.rst b/README.rst index b0811d1..58e9d59 100644 --- a/README.rst +++ b/README.rst @@ -21,26 +21,30 @@ Archive repository with all its submodules. :: - git-archive-all [-v] [--prefix PREFIX] [--no-exclude] [--force-submodules] [--extra EXTRA1 ...] [--dry-run] [-0 | ... | -9] OUTPUT_FILE + git-archive-all [-v] [-C BASE_REPO] [--prefix PREFIX] [--no-exclude] [--force-submodules] [--extra EXTRA1 ...] [--dry-run] [-0 | ... | -9] OUTPUT_FILE Options: - --version Show program's version number and exit. + --version show program's version number and exit - -h, --help Show this help message and exit. + -h, --help show this help message and exit - -v, --verbose Enable verbose mode. + -v, --verbose enable verbose mode - --prefix=PREFIX Prepend PREFIX to each filename in the archive. OUTPUT_FILE name is used by default to avoid tarbomb. You can set it to '' in order to explicitly request tarbomb. + --prefix=PREFIX prepend PREFIX to each filename in the archive; + defaults to OUTPUT_FILE name - -C BASE_REPO Use BASE_REPO as the main repository git working directory to archive. Defaults to current directory when empty - --no-exclude Don't read .gitattributes files for patterns containing export-ignore attributes. + -C BASE_REPO use BASE_REPO as the main git repository to archive; + defaults to the current directory when empty - --force-submodules Force a `git submodule init && git submodule update` at each level before iterating submodules + --no-exclude ignore the [-]export-ignore attribute in .gitattributes - --extra Include extra files to the resulting archive. + --force-submodules force `git submodule init && git submodule update` at + each level before iterating submodules - --dry-run Don't actually archive anything, just show what would be done. + --extra=EXTRA additional files to include in the archive + + --dry-run show files to be archived without actually creating the archive Questions & Answers ------------------- diff --git a/git_archive_all.py b/git_archive_all.py index 61457b0..fc69a99 100755 --- a/git_archive_all.py +++ b/git_archive_all.py @@ -547,16 +547,15 @@ def main(argv=None): type='string', dest='prefix', default=None, - help="""prepend PREFIX to each filename in the archive. - OUTPUT_FILE name is used by default to avoid tarbomb. - You can set it to '' in order to explicitly request tarbomb""") + help="""prepend PREFIX to each filename in the archive; + defaults to OUTPUT_FILE name""") parser.add_option('-C', type='string', dest='base_repo', default=None, - help="""use BASE_REPO as the main repository git working directory to archive. - Defaults to current directory when empty""") + help="""use BASE_REPO as the main git repository to archive; + defaults to the current directory when empty""") parser.add_option('-v', '--verbose', action='store_true', @@ -567,23 +566,23 @@ def main(argv=None): action='store_false', dest='exclude', default=True, - help="don't read .gitattributes files for patterns containing export-ignore attrib") + help="ignore the [-]export-ignore attribute in .gitattributes") parser.add_option('--force-submodules', action='store_true', dest='force_sub', - help='force a git submodule init && git submodule update at each level before iterating submodules') + help='force `git submodule init && git submodule update` at each level before iterating submodules') parser.add_option('--extra', action='append', dest='extra', default=[], - help="any additional files to include in the archive") + help="additional files to include in the archive") parser.add_option('--dry-run', action='store_true', dest='dry_run', - help="don't actually archive anything, just show what would be done") + help="show files to be archived without actually creating the archive") for i in range(10): parser.add_option('-{0}'.format(i),