Skip to contentSkip to conversation

git-remote add: --no-tags/--tags which one is the default option

PATCH In review Francis Moreau 3 participants 6 messages Jun 15, 2016 Documentation

lore
Share & tools
lore
#0 lore raw

Hi,

git remote add has --no-tags/--tags option, but I can't find in the man page which one is the default.

Could anybody tell me the default option ?

Thanks.

#1 lore raw

PATCH 1/1 git-remote.txt: describe behavior without --tags and --no-tags

---
 Documentation/git-remote.txt | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
Documentation/git-remote.txt +3 -0
index a77607b..f3f6f0d 100644
@@ -56,7 +56,10 @@ With `--tags` option, `git fetch <name>` imports every tag from the
 remote repository.
 +
 With `--no-tags` option, `git fetch <name>` does not import tags from
 the remote repository.
++
+By default, only tags on fetched branches are imported
+(see linkgit:git-fetch[1]).
 +
 With `-t <branch>` option, instead of the default glob
 refspec for the remote to track all branches under
Signature · 1 line
2.3.1.303.g5174db1
#2 lore raw

Re: [PATCH] git-remote.txt: describe behavior without --tags and --no-tags

Hi,

Quoted 10 lines · Michael J Gruber
---
 Documentation/git-remote.txt | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
Documentation/git-remote.txt +0 -0
index a77607b..f3f6f0d 100644

Documentation/git-remote.txt With `--tags` option, `git fetch <name>` imports every tag from the · line 63

Quoted 8 lines
Documentation/git-remote.txt +3 -0
@@ -56,7 +56,10 @@ With `--tags` option, `git fetch <name>` imports every tag from the
 remote repository.
 +
 With `--no-tags` option, `git fetch <name>` does not import tags from
 the remote repository.
++
+By default, only tags on fetched branches are imported
+(see linkgit:git-fetch[1]).
 +

So the default is neither --no-tags nor --tags ?

Thanks.

#3 lore raw

Re: [PATCH] git-remote.txt: describe behavior without --tags and --no-tags

Francis Moreau venit, vidit, dixit 02.03.2015 14:36:

Quoted 24 lines

Hi,

Quoted 10 lines · Michael J Gruber
---
 Documentation/git-remote.txt | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
Documentation/git-remote.txt +0 -0
index a77607b..f3f6f0d 100644

Documentation/git-remote.txt With `--tags` option, `git fetch <name>` imports every tag from the · line 63

Quoted 8 lines
Documentation/git-remote.txt +3 -0
@@ -56,7 +56,10 @@ With `--tags` option, `git fetch <name>` imports every tag from the
 remote repository.
 +
 With `--no-tags` option, `git fetch <name>` does not import tags from
 the remote repository.
++
+By default, only tags on fetched branches are imported
+(see linkgit:git-fetch[1]).
 +

So the default is neither --no-tags nor --tags ?

Quoted 2 lines

Thanks.

By default, only tags on fetched branches are imported. That is: When the fetch is done, all tags are imported that point to commits that are reachable from refs that you are fetching, in short: "tags on fetched branches". That is in between "none" (--no-tags) and "all" (--tags).

Michael

#4 lore raw

Re: [PATCH] git-remote.txt: describe behavior without --tags and --no-tags

Quoted 25 lines · Michael J Gruber

Francis Moreau venit, vidit, dixit 02.03.2015 14:36:

Quoted 24 lines

Hi,

Quoted 10 lines · Michael J Gruber
---
 Documentation/git-remote.txt | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
Documentation/git-remote.txt +0 -0
index a77607b..f3f6f0d 100644

Documentation/git-remote.txt With `--tags` option, `git fetch <name>` imports every tag from the · line 63

Quoted 8 lines
Documentation/git-remote.txt +3 -0
@@ -56,7 +56,10 @@ With `--tags` option, `git fetch <name>` imports every tag from the
 remote repository.
 +
 With `--no-tags` option, `git fetch <name>` does not import tags from
 the remote repository.
++
+By default, only tags on fetched branches are imported
+(see linkgit:git-fetch[1]).
 +

So the default is neither --no-tags nor --tags ?

Quoted 8 lines
Quoted 2 lines

Thanks.

By default, only tags on fetched branches are imported. That is: When the fetch is done, all tags are imported that point to commits that are reachable from refs that you are fetching, in short: "tags on fetched branches". That is in between "none" (--no-tags) and "all" (--tags).

just my 2 cents, I would find easier to read it like this:

-----
By default, only tags on fetched branches are imported. This can be changed by the --tags and --no-tags options.

With --tags option, git fetch <name> imports every tag from the remote repository (including not reachable tags from fetched refs).

With --no-tags option, git fetch <name> does not import tags from the remote repository.
-----

Thanks.

#5 lore raw
In reply to Francis Moreau
Quoted 7 lines · Francis Moreau

Hi,

git remote add has --no-tags/--tags option, but I can't find in the man page which one is the default.

Could anybody tell me the default option ?

Neither is default. This option has three states, set, unset and default:

- unset (--no-tags) doesn't fetch any tags at all
- default (no option passed) will fetch any tags that are reachable from the refs that are being fetch
- set (--tags) will fetch all tags, even if they aren't reachable.

These options can also be set with the remote.<name>.tagopt config option, which takes values [--tags|--no-tags].

Kevin