Skip to contentSkip to conversation

Remove git-zip-tree

PATCH In review Rene Scharfe 2 participants 3 messages Jun 15, 2016 Documentation

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 Remove git-zip-tree

git-zip-tree can be safely removed because it was never part of a formal release. This patch makes 'git-archive --format=zip' the one and only git ZIP file creation command.

---

 Documentation/git-zip-tree.txt |   67 ----------------------------------------
 .gitignore                     |    1 -
 builtin-zip-tree.c             |   65 --------------------------------------
 builtin.h                      |    1 -
 git.c                          |    1 -
 5 files changed, 0 insertions(+), 135 deletions(-)
Documentation/git-zip-tree.txt deleted +0 -67
deleted file mode 100644
index 2e9d981..0000000
@@ -1,67 +0,0 @@
-git-zip-tree(1)
-===============
-
-NAME
-----
-git-zip-tree - Creates a ZIP archive of the files in the named tree
-
-
-SYNOPSIS
---------
-'git-zip-tree' [-0|...|-9] <tree-ish> [ <base> ]
-
-DESCRIPTION
------------
-Creates a ZIP archive containing the tree structure for the named tree.
-When <base> is specified it is added as a leading path to the files in the
-generated ZIP archive.
-
-git-zip-tree behaves differently when given a tree ID versus when given
-a commit ID or tag ID.  In the first case the current time is used as
-modification time of each file in the archive.  In the latter case the
-commit time as recorded in the referenced commit object is used instead.
-Additionally the commit ID is stored as an archive comment.
-
-Currently git-zip-tree can handle only files and directories, symbolic
-links are not supported.
-
-OPTIONS
--------
-
--0::
-	Store the files instead of deflating them.
-
--9::
-	Highest and slowest compression level.  You can specify any
-	number from 1 to 9 to adjust compression speed and ratio.
-
-<tree-ish>::
-	The tree or commit to produce ZIP archive for.  If it is
-	the object name of a commit object.
-
-<base>::
-	Leading path to the files in the resulting ZIP archive.
-
-EXAMPLES
---------
-git zip-tree v1.4.0 git-1.4.0 >git-1.4.0.zip::
-
-	Create a ZIP file for v1.4.0 release.
-
-git zip-tree HEAD:Documentation/ git-docs >docs.zip::
-
-	Put everything in the current head's Documentation/ directory
-	into 'docs.zip', with the prefix 'git-docs/'.
-
-Author
-------
-Written by Rene Scharfe.
-
-Documentation
---------------
-Documentation by David Greaves, Junio C Hamano and the git-list <[email protected]>.
-
-GIT
----
-Part of the gitlink:git[7] suite
-
.gitignore +0 -1
index a3d9c7a..3ca66e4 100644
@@ -128,7 +128,6 @@ git-verify-pack
 git-verify-tag
 git-whatchanged
 git-write-tree
-git-zip-tree
 git-core-*/?*
 gitweb/gitweb.cgi
 test-date
builtin-zip-tree.c +0 -65

77 lines not on this page · raw message

builtin.h +0 -1
index ccade94..f9fa9ff 100644
@@ -53,7 +53,6 @@ extern int cmd_show(int argc, const char
 extern int cmd_stripspace(int argc, const char **argv, const char *prefix);
 extern int cmd_symbolic_ref(int argc, const char **argv, const char *prefix);
 extern int cmd_tar_tree(int argc, const char **argv, const char *prefix);
-extern int cmd_zip_tree(int argc, const char **argv, const char *prefix);
 extern int cmd_unpack_objects(int argc, const char **argv, const char *prefix);
 extern int cmd_update_index(int argc, const char **argv, const char *prefix);
 extern int cmd_update_ref(int argc, const char **argv, const char *prefix);
git.c +0 -1
index 44ab0de..1686220 100644
@@ -259,7 +259,6 @@ static void handle_internal_command(int 
 		{ "stripspace", cmd_stripspace },
 		{ "symbolic-ref", cmd_symbolic_ref, RUN_SETUP },
 		{ "tar-tree", cmd_tar_tree, RUN_SETUP },
-		{ "zip-tree", cmd_zip_tree, RUN_SETUP },
 		{ "unpack-objects", cmd_unpack_objects, RUN_SETUP },
 		{ "update-index", cmd_update_index, RUN_SETUP },
 		{ "update-ref", cmd_update_ref, RUN_SETUP },
#1 lore raw
Quoted 4 lines · Rene Scharfe

git-zip-tree can be safely removed because it was never part of a formal release. This patch makes 'git-archive --format=zip' the one and only git ZIP file creation command.

[snip]

Quoted 4 lines
(quoted diff) +0 -4
-
-Currently git-zip-tree can handle only files and directories, symbolic
-links are not supported.
-

Review

Quoted 10 lines
(quoted diff) +0 -10
-OPTIONS
--------
-
--0::
-	Store the files instead of deflating them.
-
--9::
-	Highest and slowest compression level.  You can specify any
-	number from 1 to 9 to adjust compression speed and ratio.
-

We should keep these options documented somewhere... What about this ?

-- >8 --

Subject: [PATCH] git-archive: update documentation

This patch documents zip backend options.

It also adds git-archive command into the main git manual page.

---
 Documentation/git-archive.txt |   13 +++++++++++++
 Documentation/git.txt         |    3 +++
 2 files changed, 16 insertions(+), 0 deletions(-)
Documentation/git-archive.txt +13 -0
index 913528d..031fcd5 100644
@@ -40,6 +40,7 @@ OPTIONS
 
 <extra>::
 	This can be any options that the archiver backend understand.
+	See next section.
 
 --remote=<repo>::
 	Instead of making a tar archive from local repository,
@@ -52,6 +53,18 @@ path::
 	If one or more paths are specified, include only these in the
 	archive, otherwise include all files and subdirectories.
 
+BACKEND EXTRA OPTIONS
+---------------------
+
+zip
+~~~
+-0::
+	Store the files instead of deflating them.
+-9::
+	Highest and slowest compression level.  You can specify any
+	number from 1 to 9 to adjust compression speed and ratio.
+
+
 CONFIGURATION
 -------------
 By default, file and directories modes are set to 0666 or 0777 in tar
Documentation/git.txt +3 -0
index 1bf5ef5..2135b65 100644
@@ -266,6 +266,9 @@ gitlink:git-am[1]::
 gitlink:git-applymbox[1]::
 	Apply patches from a mailbox, original version by Linus.
 
+gitlink:git-archive[1]::
+	Creates an archive of files from a named tree.
+
 gitlink:git-bisect[1]::
 	Find the change that introduced a bug by binary search.
 
Signature · 1 line
1.4.2.1
#2 lore raw
Quoted 6 lines · Franck Bui-Huu

Subject: [PATCH] git-archive: update documentation

This patch documents zip backend options.

It also adds git-archive command into the main git manual page.

Ah, yes. Thanks for catching this omission.

René