Skip to contentSkip to conversation

git-fetch: auto-following tags.

PATCH New Junio C Hamano 1 participant 1 message Jun 15, 2016 Documentation

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 git-fetch: auto-following tags.

I added things to ls-remote so that Cogito can auto-follow tags easily and correctly a while ago, but git-fetch did not use the facility. Recently added git-describe command relies on repository keeping up-to-date set of tags, which made it much more attractive to automatically follow tags, so we do that as well.

---

* This is not 1.0.X material rather for 1.1.0

 Documentation/fetch-options.txt |   18 ++
 git-fetch.sh                    |  283 ++++++++++++++++++++++-----------------
 2 files changed, 173 insertions(+), 128 deletions(-)

6f3ccd3bdb2e2b2187c93bfa0c6f957b44a2e206

Documentation/fetch-options.txt +13 -5
index 200c9b2..1fe8423 100644
@@ -10,15 +10,23 @@
 	fetches is a descendant of `<lbranch>`.  This option
 	overrides that check.
 
+\--no-tags::
+	By default, `git-fetch` fetches tags that point at
+	objects that are downloaded from the remote repository
+	and stores them locally.  This option disables this
+	automatic tag following.
+
 -t, \--tags::
-	By default, the git core utilities will not fetch and store
-	tags under the same name as the remote repository;  ask it
-	to do so using `--tags`.  Using this option will bound the
-	list of objects pulled to the remote tags.  Commits in branches
-	beyond the tags will be ignored.
+	Most of the tags are fetched automatically as branch
+	heads are downloaded, but tags that do not point at
+	objects reachable from the branch heads that are being
+	tracked will not be fetched by this mechanism.  This
+	flag lets all tags and their associated objects be
+	downloaded.
 
 -u, \--update-head-ok::
 	By default `git-fetch` refuses to update the head which
 	corresponds to the current branch.  This flag disables the
 	check.  Note that fetching into the current branch will not
 	update the index and working directory, so use it with care.
+
git-fetch.sh +160 -123

305 lines not on this page · raw message

Signature · 1 line
1.0.7-g0263