summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 170774a)
raw | patch | inline | side by side (parent: 170774a)
author | Linus Torvalds <torvalds@ppc970.osdl.org> | |
Thu, 23 Jun 2005 15:59:00 +0000 (08:59 -0700) | ||
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | |
Thu, 23 Jun 2005 15:59:00 +0000 (08:59 -0700) |
Use "git fetch <repo> tag <tagname>" to get the named tag and everything
it points to.
it points to.
git-fetch-script | patch | blob | history |
diff --git a/git-fetch-script b/git-fetch-script
index 2e62f001b189249243ad27b88bf8357526095f14..fb4a53776ac0f3f5d95e4c4b6a68ab0b3913974c 100755 (executable)
--- a/git-fetch-script
+++ b/git-fetch-script
#!/bin/sh
#
+destination=FETCH_HEAD
+
merge_repo=$1
merge_name=${2:-HEAD}
+if [ "$2" = "tag" ]; then
+ merge_name="refs/tags/$3"
+ destination="$merge_name"
+fi
: ${GIT_DIR=.git}
: ${GIT_OBJECT_DIRECTORY="${SHA1_FILE_DIRECTORY-"$GIT_DIR/objects"}"}
}
echo "Getting remote $merge_name"
-download_one "$merge_repo/$merge_name" "$GIT_DIR"/FETCH_HEAD || exit 1
+download_one "$merge_repo/$merge_name" "$GIT_DIR/$destination" || exit 1
echo "Getting object database"
-download_objects "$merge_repo" "$(cat "$GIT_DIR"/FETCH_HEAD)" || exit 1
+download_objects "$merge_repo" "$(cat "$GIT_DIR/$destination")" || exit 1