Skip to content

Commit

Permalink
Tweak the help message and README.
Browse files Browse the repository at this point in the history
  • Loading branch information
Kentzo committed Feb 9, 2020
1 parent a55f9a7 commit 81179ca
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 19 deletions.
24 changes: 14 additions & 10 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
-------------------
Expand Down
17 changes: 8 additions & 9 deletions git_archive_all.py
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand All @@ -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),
Expand Down

0 comments on commit 81179ca

Please sign in to comment.