diff options
author | Guido Guenther <agx@sigxcpu.org> | 2008-05-08 17:58:49 +0200 |
---|---|---|
committer | Guido Guenther <agx@sigxcpu.org> | 2008-05-08 17:58:49 +0200 |
commit | 673911779507dffcab2fda52a0a7b8c5456eafd4 (patch) | |
tree | bedfed939ae721d5b9dab2f39a67d7583a60c060 | |
parent | dc1333a7ab68689378b40e8484e7ee3de9eb6926 (diff) |
add --git-dont-purge to leave the exported build dir intact
Closes: #479848
Thanks: Kurt B. Kaiser for the patch
-rw-r--r-- | docs/manpages/git-buildpackage.sgml | 8 | ||||
-rwxr-xr-x | git-buildpackage | 4 |
2 files changed, 11 insertions, 1 deletions
diff --git a/docs/manpages/git-buildpackage.sgml b/docs/manpages/git-buildpackage.sgml index 75edcd62..0b1c8ed6 100644 --- a/docs/manpages/git-buildpackage.sgml +++ b/docs/manpages/git-buildpackage.sgml @@ -35,6 +35,7 @@ <arg><option>--git-export-dir=</option><replaceable>directory</replaceable></arg> <arg><option>--git-export=</option><replaceable>treeish</replaceable></arg> <arg><option>--git-pristine-tar</option></arg> + <arg><option>--git-dont-purge</option></arg> </cmdsynopsis> </refsynopsisdiv> <refsect1> @@ -204,6 +205,13 @@ <para>use pristine-tar to create the orig.tar.gz</para> </listitem> </varlistentry> + <varlistentry> + <term><option>--git-dont-purge</option> + </term> + <listitem> + <para>retain exported build directory after build</para> + </listitem> + </varlistentry> </variablelist> </refsect1> <refsect1> diff --git a/git-buildpackage b/git-buildpackage index 62c96538..7b278af4 100755 --- a/git-buildpackage +++ b/git-buildpackage @@ -171,6 +171,8 @@ def main(argv): help="Use pristine-tar to create .orig.tar.gz", action="store_true") parser.add_option("--git-export", dest="treeish", default=default_tree, help="export treeish object TREEISH, default is '%s'" % default_tree) + parser.add_option("--git-dont-purge", action="store_false", dest="purge", default=True, + help="retain exported build directory after build") (options, args) = parser.parse_args(args) if options.verbose: @@ -270,7 +272,7 @@ def main(argv): print >>sys.stderr, err retval = 1 - if options.export_dir and not retval: + if options.export_dir and options.purge and not retval: RemoveTree(export_dir)() return retval |