Merge branch 'dj/fetch-tagopt' into maint
authorJunio C Hamano <gitster@pobox.com>
Wed, 1 Sep 2010 20:52:10 +0000 (13:52 -0700)
committerJunio C Hamano <gitster@pobox.com>
Wed, 1 Sep 2010 20:52:10 +0000 (13:52 -0700)
* dj/fetch-tagopt:
fetch: allow command line --tags to override config

1  2 
Documentation/config.txt
builtin/fetch.c
diff --combined Documentation/config.txt
index 7fffee7e3de29181479da083b086bf537c6f9354,297101f1a560cb5601666098e94669e9cd4fbfa1..dc4e83b10365e04f7b83ddc2015867d04b8cea45
@@@ -128,7 -128,7 +128,7 @@@ advice.*:
                when writing commit messages. Default: true.
        commitBeforeMerge::
                Advice shown when linkgit:git-merge[1] refuses to
 -              merge to avoid overwritting local changes.
 +              merge to avoid overwriting local changes.
                Default: true.
        resolveConflict::
                Advices shown by various commands when conflicts
@@@ -418,7 -418,7 +418,7 @@@ Common unit suffixes of 'k', 'm', or 'g
  
  core.deltaBaseCacheLimit::
        Maximum number of bytes to reserve for caching base objects
 -      that multiple deltafied objects reference.  By storing the
 +      that may be referenced by multiple deltified objects.  By storing the
        entire decompressed base objects in a cache Git is able
        to avoid unpacking and decompressing frequently used base
        objects multiple times.
@@@ -563,7 -563,7 +563,7 @@@ not necessarily be the current director
  am.keepcr::
        If true, git-am will call git-mailsplit for patches in mbox format
        with parameter '--keep-cr'. In this case git-mailsplit will
 -      not remove `\r` from lines ending with `\r\n`. Can be overrriden
 +      not remove `\r` from lines ending with `\r\n`. Can be overridden
        by giving '--no-keep-cr' from the command line.
        See linkgit:git-am[1], linkgit:git-mailsplit[1].
  
@@@ -1002,7 -1002,7 +1002,7 @@@ gitcvs.usecrlfattr:
        If true, the server will look up the end-of-line conversion
        attributes for files to determine the '-k' modes to use. If
        the attributes force git to treat a file as text,
 -      the '-k' mode will be left blank so cvs clients will
 +      the '-k' mode will be left blank so CVS clients will
        treat it as text. If they suppress text conversion, the file
        will be set with '-kb' mode, which suppresses any newline munging
        the client might otherwise do. If the attributes do not allow
@@@ -1275,9 -1275,7 +1275,9 @@@ instaweb.local:
        be bound to the local IP (127.0.0.1).
  
  instaweb.modulepath::
 -      The module path for an apache httpd used by linkgit:git-instaweb[1].
 +      The default module path for linkgit:git-instaweb[1] to use
 +      instead of /usr/lib/apache2/modules.  Only used if httpd
 +      is Apache.
  
  instaweb.port::
        The port number to bind the gitweb httpd to. See
@@@ -1560,10 -1558,6 +1560,10 @@@ receive.denyDeletes:
        If set to true, git-receive-pack will deny a ref update that deletes
        the ref. Use this to prevent such a ref deletion via a push.
  
 +receive.denyDeleteCurrent::
 +      If set to true, git-receive-pack will deny a ref update that
 +      deletes the currently checked out branch of a non-bare repository.
 +
  receive.denyCurrentBranch::
        If set to true or "refuse", git-receive-pack will deny a ref update
        to the currently checked out branch of a non-bare repository.
@@@ -1629,7 -1623,9 +1629,9 @@@ remote.<name>.tagopt:
        Setting this value to \--no-tags disables automatic tag following when
        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.
+       branch heads. Passing these flags directly to linkgit:git-fetch[1] can
+       override this setting. See options \--tags and \--no-tags of
+       linkgit:git-fetch[1].
  
  remote.<name>.vcs::
        Setting this to a value <vcs> will cause git to interact with
diff --combined builtin/fetch.c
index 1b67f5fda55896635e91852657259b47e722c889,42554680f74158051f290bdc613d7da72e07c173..7a5314415312e4c0e6e17e5a8934099d3d1274c4
@@@ -675,10 -675,12 +675,12 @@@ static int do_fetch(struct transport *t
  
        for_each_ref(add_existing, &existing_refs);
  
-       if (transport->remote->fetch_tags == 2 && tags != TAGS_UNSET)
-               tags = TAGS_SET;
-       if (transport->remote->fetch_tags == -1)
-               tags = TAGS_UNSET;
+       if (tags == TAGS_DEFAULT) {
+               if (transport->remote->fetch_tags == 2)
+                       tags = TAGS_SET;
+               if (transport->remote->fetch_tags == -1)
+                       tags = TAGS_UNSET;
+       }
  
        if (!transport->get_refs_list || !transport->fetch)
                die("Don't know how to fetch from %s", transport->url);
@@@ -845,8 -847,7 +847,8 @@@ static int fetch_one(struct remote *rem
        int exit_code;
  
        if (!remote)
 -              die("Where do you want to fetch from today?");
 +              die("No remote repository specified.  Please, specify either a URL or a\n"
 +                  "remote name from which new revisions should be fetched.");
  
        transport = transport_get(remote, NULL);
        transport_set_verbosity(transport, verbosity, progress);