summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 5469e2d)
raw | patch | inline | side by side (parent: 5469e2d)
author | Samuel Tardieu <sam@rfc1149.net> | |
Mon, 19 Apr 2010 23:31:25 +0000 (01:31 +0200) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Mon, 19 Apr 2010 23:34:49 +0000 (16:34 -0700) |
If the "tagopt = --tags" option of a remote is set, all tags
will be fetched as in "git fetch --tags".
Signed-off-by: Samuel Tardieu <sam@rfc1149.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
will be fetched as in "git fetch --tags".
Signed-off-by: Samuel Tardieu <sam@rfc1149.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/config.txt | patch | blob | history | |
contrib/examples/git-fetch.sh | patch | blob | history | |
remote.c | patch | blob | history |
index 92f851e797ca820f6f6126391eafee0d4eec7e26..630e7ca0c9ff2d7c7ac9c6b5cd66d1cb060ae9ef 100644 (file)
--- a/Documentation/config.txt
+++ b/Documentation/config.txt
remote.<name>.tagopt::
Setting this value to \--no-tags disables automatic tag following when
- fetching from remote <name>
+ fetching from remote <name>. Setting it to \--tags will fetch every
+ tag from remote <name>, even if they are not reachable from remote
+ branch heads.
remote.<name>.vcs::
Setting this to a value <vcs> will cause git to interact with
index e44af2c86d8e7e44bc79aafcc8ccef3806804720..a314273bd51a865d9d5fc5cd899a51ffa70388a5 100755 (executable)
orig_head=$(git rev-parse --verify HEAD 2>/dev/null)
fi
-# Allow --notags from remote.$1.tagopt
+# Allow --tags/--notags from remote.$1.tagopt
case "$tags$no_tags" in
'')
case "$(git config --get "remote.$1.tagopt")" in
+ --tags)
+ tags=t ;;
--no-tags)
no_tags=t ;;
esac
diff --git a/remote.c b/remote.c
index c70181cdc621b27ed02aba17b3e4f7ab64518e9f..0f073e0b5f9f08510af3a9e0ab5aed106475b30f 100644 (file)
--- a/remote.c
+++ b/remote.c
} else if (!strcmp(subkey, ".tagopt")) {
if (!strcmp(value, "--no-tags"))
remote->fetch_tags = -1;
+ else if (!strcmp(value, "--tags"))
+ remote->fetch_tags = 2;
} else if (!strcmp(subkey, ".proxy")) {
return git_config_string((const char **)&remote->http_proxy,
key, value);