summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 3f0f756)
raw | patch | inline | side by side (parent: 3f0f756)
author | Junio C Hamano <junkio@cox.net> | |
Sun, 28 May 2006 17:14:38 +0000 (10:14 -0700) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Sun, 28 May 2006 17:14:38 +0000 (10:14 -0700) |
Signed-off-by: Junio C Hamano <junkio@cox.net>
Documentation/git-clone.txt | patch | blob | history | |
git-clone.sh | patch | blob | history |
index b333f510454fff9dc6828b62ca8a0b0dc4c116f6..94d93933721274be4b5c4e3f5694593ec74fd22c 100644 (file)
SYNOPSIS
--------
[verse]
-'git-clone' [-l [-s]] [-q] [-n] [--bare] [-o <name>] [-u <upload-pack>]
- [--reference <repository>]
+'git-clone' [--template=<template_directory>] [-l [-s]] [-q] [-n] [--bare]
+ [-o <name>] [-u <upload-pack>] [--reference <repository>]
<repository> [<directory>]
DESCRIPTION
the command to specify non-default path for the command
run on the other end.
+--template=<template_directory>::
+ Specify the directory from which templates will be used;
+ if unset the templates are taken from the installation
+ defined default, typically `/usr/share/git-core/templates`.
+
<repository>::
The (possibly remote) repository to clone from. It can
be any URL git-fetch supports.
diff --git a/git-clone.sh b/git-clone.sh
index d96894d4c2aa6e6c0aa38ca0755ffa16ace2161c..de59904d56155faecedbd7cd4818a741dde43ffd 100755 (executable)
--- a/git-clone.sh
+++ b/git-clone.sh
unset CDPATH
usage() {
- echo >&2 "Usage: $0 [--use-separate-remote] [--reference <reference-repo>] [--bare] [-l [-s]] [-q] [-u <upload-pack>] [--origin <name>] [-n] <repo> [<dir>]"
+ echo >&2 "Usage: $0 [--template=<template_directory>] [--use-separate-remote] [--reference <reference-repo>] [--bare] [-l [-s]] [-q] [-u <upload-pack>] [--origin <name>] [-n] <repo> [<dir>]"
exit 1
}
local=no
use_local=no
local_shared=no
+unset template
no_checkout=
upload_pack=
bare=
*,-l|*,--l|*,--lo|*,--loc|*,--loca|*,--local) use_local=yes ;;
*,-s|*,--s|*,--sh|*,--sha|*,--shar|*,--share|*,--shared)
local_shared=yes; use_local=yes ;;
+ 1,--template) usage ;;
+ *,--template)
+ shift; template="--template=$1" ;;
+ *,--template=*)
+ template="$1" ;;
*,-q|*,--quiet) quiet=-q ;;
*,--use-separate-remote)
use_separate_remote=t ;;
case "$bare" in
yes) GIT_DIR="$D" ;;
*) GIT_DIR="$D/.git" ;;
-esac && export GIT_DIR && git-init-db || usage
+esac && export GIT_DIR && git-init-db ${template+"$template"} || usage
case "$bare" in
yes)
GIT_DIR="$D" ;;