Skip to content

Commit 5e19850

Browse files
committed
Merge pull request #15 from silverorange/treeish-option
Add user-definable tree-ish support to archive all script.
2 parents 81c7c1b + c38c3de commit 5e19850

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

git-archive-all.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,11 @@ function usage () {
7777
echo " for each of the superproject itself and its submodules. The default is to"
7878
echo " concatenate individual archives into one larger archive."
7979
echo
80+
echo " If '--tree-ish' is specified, the archive will be created based on whatever"
81+
echo " you define the tree-ish to be. Branch names, commit hash, etc. are acceptable."
82+
echo " Defaults to HEAD if not specified. See git archive's documentation for more"
83+
echo " information on what a tree-ish is."
84+
echo
8085
echo " If 'output_file' is specified, the resulting archive is created as the"
8186
echo " file named. This parameter is essentially a path that must be writeable."
8287
echo " When combined with '--separate' ('-s') this path must refer to a directory."
@@ -133,6 +138,12 @@ while test $# -gt 0; do
133138
SEPARATE=1
134139
;;
135140

141+
--tree-ish | -t )
142+
shift
143+
TREEISH="$1"
144+
shift
145+
;;
146+
136147
--version )
137148
version
138149
exit

0 commit comments

Comments
 (0)