Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2005-06-23 05:49:43 +0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-06-23 05:49:43 +0400
commit3f571e0b3a7893ed068acd75f27e152d29945637 (patch)
tree4f8ec995afbd9e30705e148b4f0b33a2ace9fde6
parent60646e9a7170750093599fc52ad56453fc516185 (diff)
Add "git-clone-script" thingy
It's just a trivial wrapper, but it should make Jeff's kernel developer guide to git look a bit less intimidating.
-rw-r--r--Makefile3
-rwxr-xr-xgit-clone-script7
2 files changed, 9 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index c041cc7f08..e3405dc3a7 100644
--- a/Makefile
+++ b/Makefile
@@ -24,7 +24,8 @@ SCRIPTS=git git-apply-patch-script git-merge-one-file-script git-prune-script \
git-pull-script git-tag-script git-resolve-script git-whatchanged \
git-deltafy-script git-fetch-script git-status-script git-commit-script \
git-log-script git-shortlog git-cvsimport-script git-diff-script \
- git-reset-script git-add-script git-checkout-script gitk
+ git-reset-script git-add-script git-checkout-script git-clone-script \
+ gitk
PROG= git-update-cache git-diff-files git-init-db git-write-tree \
git-read-tree git-commit-tree git-cat-file git-fsck-cache \
diff --git a/git-clone-script b/git-clone-script
new file mode 100755
index 0000000000..654f66dcc2
--- /dev/null
+++ b/git-clone-script
@@ -0,0 +1,7 @@
+#!/bin/sh
+repo="$1"
+dir="$2"
+mkdir $dir || exit 1
+cd $dir
+git-init-db
+git fetch "$repo" && ( git-rev-parse FETCH_HEAD > .git/HEAD )