{"thread":{"id":"4307","subject":"[PATCH 1/2] add --template=<template_directory> option to git-clone","startedAt":"2006-05-27T10:25:38Z","lastAt":"2006-05-27T10:25:38Z","messageCount":1,"participants":["Matthias Lederhofer"],"isPatch":true,"patchVersion":1,"patchTotal":2},"messages":[{"id":"20789","messageId":"24462.1924161494$1148725552@news.gmane.org","threadId":"4307","inReplyTo":null,"subject":"[PATCH 1/2] add --template=<template_directory> option to git-clone","fromName":"Matthias Lederhofer","fromEmail":"matled@gmx.net","sentAt":"2006-05-27T10:25:38Z","receivedAt":"2006-05-27T10:25:38Z","isPatch":true,"sender":{"key":"matled@gmx.net","avatar":null},"body":"---\n\na176a8eae1d0e8e87028c4185ad5500ce2845441\n Documentation/git-clone.txt |    8 ++++++--\n git-clone.sh                |    7 +++++--\n 2 files changed, 11 insertions(+), 4 deletions(-)\n\na176a8eae1d0e8e87028c4185ad5500ce2845441\ndiff --git a/Documentation/git-clone.txt b/Documentation/git-clone.txt\nindex b333f51..881b464 100644\n--- a/Documentation/git-clone.txt\n+++ b/Documentation/git-clone.txt\n@@ -9,8 +9,8 @@ git-clone - Clones a repository\n SYNOPSIS\n --------\n [verse]\n-'git-clone' [-l [-s]] [-q] [-n] [--bare] [-o <name>] [-u <upload-pack>]\n-\t  [--reference <repository>]\n+'git-clone' [--template=<template_directory>] [-l [-s]] [-q] [-n] [--bare]\n+\t  [-o <name>] [-u <upload-pack>] [--reference <repository>]\n \t  <repository> [<directory>]\n \n DESCRIPTION\n@@ -34,6 +34,10 @@ branch you are currently working on.  Re\n \n OPTIONS\n -------\n+--template=<template_directory>::\n+\tProvide the directory from which templates will be used.\n+\tThe default template directory is `/usr/share/git-core/templates`.\n+\n --local::\n -l::\n \tWhen the repository to clone from is on a local machine,\ndiff --git a/git-clone.sh b/git-clone.sh\nindex d96894d..1c7ae12 100755\n--- a/git-clone.sh\n+++ b/git-clone.sh\n@@ -9,7 +9,7 @@ # See git-sh-setup why.\n unset CDPATH\n \n usage() {\n-\techo >&2 \"Usage: $0 [--use-separate-remote] [--reference <reference-repo>] [--bare] [-l [-s]] [-q] [-u <upload-pack>] [--origin <name>] [-n] <repo> [<dir>]\"\n+\techo >&2 \"Usage: $0 [--template=<template_directory>] [--use-separate-remote] [--reference <reference-repo>] [--bare] [-l [-s]] [-q] [-u <upload-pack>] [--origin <name>] [-n] <repo> [<dir>]\"\n \texit 1\n }\n \n@@ -102,6 +102,7 @@ quiet=\n local=no\n use_local=no\n local_shared=no\n+template=\n no_checkout=\n upload_pack=\n bare=\n@@ -120,6 +121,8 @@ while\n \t*,-l|*,--l|*,--lo|*,--loc|*,--loca|*,--local) use_local=yes ;;\n         *,-s|*,--s|*,--sh|*,--sha|*,--shar|*,--share|*,--shared) \n           local_shared=yes; use_local=yes ;;\n+\t*,--template=*)\n+\t  template=\"$1\" ;;\n \t*,-q|*,--quiet) quiet=-q ;;\n \t*,--use-separate-remote)\n \t\tuse_separate_remote=t ;;\n@@ -203,7 +206,7 @@ trap 'err=$?; cd ..; rm -r \"$D\"; exit $e\n case \"$bare\" in\n yes) GIT_DIR=\"$D\" ;;\n *) GIT_DIR=\"$D/.git\" ;;\n-esac && export GIT_DIR && git-init-db || usage\n+esac && export GIT_DIR && git-init-db \"$template\" || usage\n case \"$bare\" in\n yes)\n \tGIT_DIR=\"$D\" ;;\n-- \n1.3.3.g40505\n"}]}